diff options
Diffstat (limited to 'testsuite/signature.test')
-rwxr-xr-x | testsuite/signature.test | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/testsuite/signature.test b/testsuite/signature.test index aead30a..4741fb1 100755 --- a/testsuite/signature.test +++ b/testsuite/signature.test @@ -2,8 +2,12 @@ # librsync -- the library for network deltas # -# Copyright (C) 2001 by Martin Pool <mbp@sourcefrog.net> -# +# signature.test: Test that `rdiff signature` produces the exactly expected +# output: this is supposed to check that it remains compatible with previous +# versions. + +# Copyright (C) 2001, 2014 by Martin Pool <mbp@sourcefrog.net> + # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 of @@ -22,12 +26,15 @@ new=$tmpdir/signature -for input in "$srcdir/signature.input"/*.in +for hashfunc in md4 blake2 do - for inbuf in $bufsizes + for input in "$srcdir/signature.input"/*.in do - expect=`echo $input | sed -e 's/.in$/.sig/'` - run_test ../rdiff -I$inbuf signature "$input" "$new" - cmp "$expect" "$new" || fail_test "signature -I$inbuf $input" + for inbuf in $bufsizes + do + expect=`echo $input | sed -e 's/.in$/.sig/' -e "s,input,input/$hashfunc,"` + run_test ../rdiff --hash=$hashfunc -I$inbuf signature "$input" "$new" + check_compare "$expect" "$new" + done done done |