Skip to content

Commit

Permalink
Add tests of deterministic file input with rdgen
Browse files Browse the repository at this point in the history
  • Loading branch information
TheQuantumPhysicist committed Oct 4, 2024
1 parent 502698e commit acc141c
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion test-tools/run-cmd-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ compare_output "$output1" "$output2"


######################################################################
# Tests of algos - Large data
# Tests of algos - Large data with pipe
######################################################################

######################################################################
Expand All @@ -835,6 +835,36 @@ compare_output "$output1" "$output2"
######################################################################


######################################################################
# Tests of algos - Large data with file
######################################################################

######################################################################
echo -n "abc" | rdgen -l100000 > data.bin
output1=$(target/release/thash -f data.bin)
output2=$(echo "befb724c57435953a1740c0467f85ec09c212259e88afdd9a079c465ec03fd2a41ff976000d87f2f9c4eb87a0c05f5dc1be60c63650e2e8eb09b94faaff830c8")

compare_output "$output1" "$output2"
######################################################################

######################################################################
echo -n "abc" | rdgen -l100000 > data.bin
output1=$(target/release/thash -f data.bin -i10)
output2=$(echo "95b0e2039c1e25b99c98a5d71537d3746020ccbeab017a99f9650ea912f93b8171d5035fed3c524425a9a6358bdd5615e847c90b7e57428d51ec11d2f90db1ca")

compare_output "$output1" "$output2"
######################################################################

######################################################################
echo -n "abc" | rdgen -l100000 > data.bin
output1=$(target/release/thash -f data.bin -i10 -a sha256)
output2=$(echo "39ccf4908ef54473556e785c4eb248fe28bd229b00bb008a61c811d795966e6b")

compare_output "$output1" "$output2"
######################################################################

rm data.bin


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

0 comments on commit acc141c

Please sign in to comment.