Ignore:
Timestamp:
Jun 16, 2007, 3:29:39 PM (17 years ago)
Author:
rainer
Message:

Fix incorrect handling of files with zero size in GrowingLogFiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cutest_sh_tiger0.c

    r96 r107  
    139139  /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192)
    140140   */
    141   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     141  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
    142142  expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
    143143  CuAssertStrEquals(tc, expected, actual);
     
    147147  tiger_fd  = rval_open;
    148148
    149   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
     149  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
    150150  expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095";
    151151  CuAssertStrEquals(tc, expected, actual);
     
    163163  /* same result as GNU md5sum
    164164   */
    165   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
     165  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
    166166  expected = "AEEC4DDA496BCFBA691F4E8863BA84C00000000000000000";
    167167  CuAssertStrEquals(tc, expected, actual);
     
    179179  /* same result as gpg --print-md SHA1
    180180   */
    181   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
     181  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
    182182  expected = "2FE65D1D995B8F8BC8B13F798C07E7E935A787ED00000000";
    183183  CuAssertStrEquals(tc, expected, actual);
     
    205205  /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192)
    206206   */
    207   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     207  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
    208208  expected = "F987845A0EA784367BF9E4DB09014995810F27C99C891734";
    209209  CuAssertStrEquals(tc, expected, actual);
     
    228228  /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192)
    229229   */
    230   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     230  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
    231231  expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
    232232  CuAssertStrEquals(tc, expected, actual);
     
    268268  /* same as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192)
    269269   */
     270  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     271  expected = "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A";
     272  CuAssertStrEquals(tc, expected, actual);
     273
    270274  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0);
    271275  expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8";
     
    276280  CuAssertStrEquals(tc, expected, actual);
    277281
    278   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     282  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
    279283  expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90";
    280284  CuAssertStrEquals(tc, expected, actual);
     
    299303  CuAssertStrEquals(tc, expected, actual);
    300304
    301   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0);
     305  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0);
    302306  expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F";
    303307  CuAssertStrEquals(tc, expected, actual);
     
    337341  CuAssertTrue(tc, rval_open >= 0);
    338342
    339   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
     343  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
    340344  expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000";
    341345  CuAssertStrEquals(tc, expected, actual);
     
    371375  CuAssertTrue(tc, rval_open >= 0);
    372376
    373   actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, 0, 0);
     377  actual = sh_tiger_generic_hash("cutest_foo", TIGER_FD, TIGER_NOLIM, 0);
    374378  expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000";
    375379  CuAssertStrEquals(tc, expected, actual);
Note: See TracChangeset for help on using the changeset viewer.