Skip to content

Commit 407a4b2

Browse files
authored
Update testValidity.sh
1 parent 452f75d commit 407a4b2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testValidity.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ dd if=/dev/urandom of=randomData bs=1M count=1000 2>/dev/null || fail "Failed to
99
CKEY=test go run chap.go e < randomData > encryptedData || fail "Failed to encrypt data"
1010
CKEY=test go run chap.go d < encryptedData > decryptedData || fail "Failed to decrypt data"
1111

12+
# Test pipe to make sure no decryption errors occur
13+
dd if=/dev/urandom bs=1M count=1000 | CKEY=test go run chap.go e | CKEY=test go run chap.go d > /dev/null
14+
15+
1216
# Check if on macOS, use md5 instead of md5sum
1317
if [ "$(uname)" == "Darwin" ]; then
1418
ORIGINAL_MD5=$(md5 -q randomData)
@@ -24,4 +28,4 @@ fi
2428

2529
rm randomData encryptedData decryptedData || fail "Failed to clean up"
2630

27-
echo "All tests passed successfully!"
31+
echo "All tests passed successfully!"

0 commit comments

Comments
 (0)