Skip to content

Commit acc141c

Browse files
Add tests of deterministic file input with rdgen
1 parent 502698e commit acc141c

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

test-tools/run-cmd-tests.sh

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ compare_output "$output1" "$output2"
810810

811811

812812
######################################################################
813-
# Tests of algos - Large data
813+
# Tests of algos - Large data with pipe
814814
######################################################################
815815

816816
######################################################################
@@ -835,6 +835,36 @@ compare_output "$output1" "$output2"
835835
######################################################################
836836

837837

838+
######################################################################
839+
# Tests of algos - Large data with file
840+
######################################################################
841+
842+
######################################################################
843+
echo -n "abc" | rdgen -l100000 > data.bin
844+
output1=$(target/release/thash -f data.bin)
845+
output2=$(echo "befb724c57435953a1740c0467f85ec09c212259e88afdd9a079c465ec03fd2a41ff976000d87f2f9c4eb87a0c05f5dc1be60c63650e2e8eb09b94faaff830c8")
846+
847+
compare_output "$output1" "$output2"
848+
######################################################################
849+
850+
######################################################################
851+
echo -n "abc" | rdgen -l100000 > data.bin
852+
output1=$(target/release/thash -f data.bin -i10)
853+
output2=$(echo "95b0e2039c1e25b99c98a5d71537d3746020ccbeab017a99f9650ea912f93b8171d5035fed3c524425a9a6358bdd5615e847c90b7e57428d51ec11d2f90db1ca")
854+
855+
compare_output "$output1" "$output2"
856+
######################################################################
857+
858+
######################################################################
859+
echo -n "abc" | rdgen -l100000 > data.bin
860+
output1=$(target/release/thash -f data.bin -i10 -a sha256)
861+
output2=$(echo "39ccf4908ef54473556e785c4eb248fe28bd229b00bb008a61c811d795966e6b")
862+
863+
compare_output "$output1" "$output2"
864+
######################################################################
865+
866+
rm data.bin
867+
838868

839869
######################################################################
840870
echo "All tests passed successfully."

0 commit comments

Comments
 (0)