Add some tests.
[crypto_lab2.git] / labo2-fsharp / run_tests.sh
1 #/usr/bin/env bash
2 xbuild /p:Configuration=Debug labo2-fsharp.sln
3
4 export MONO_TRACE_LISTENER=Console.Error
5
6 CryptoFileTests/bin/Debug/CryptoFileTests.exe tests
7
8 echo "Plaintext:"
9 cat plaintext.txt
10 echo
11
12 # Encrypt the file 'plaintext.txt'.
13 CryptoFileTests/bin/Debug/CryptoFileTests.exe encrypt plaintext.txt ciphertext
14
15 # Decrypt the file 'ciphertext' to the directory 'output'.
16 rm -r output
17 mkdir output
18 CryptoFileTests/bin/Debug/CryptoFileTests.exe decrypt ciphertext output
19
20 echo "Decrypted ciphertext:"
21 cat output/plaintext.txt
22 echo
23