:) encrypts "A" as "Z" using ZYXWVUTSRQPONMLKJIHGFEDCBA as key
Log
running ./substitution ZYXWVUTSRQPONMLKJIHGFEDCBA...
sending input A...
checking for output "ciphertext: Z\n"...
checking that program exited with status 0...
:) encrypts "a" as "z" using ZYXWVUTSRQPONMLKJIHGFEDCBA as key
Log
running ./substitution ZYXWVUTSRQPONMLKJIHGFEDCBA...
sending input a...
checking for output "ciphertext: z\n"...
checking that program exited with status 0...
:) encrypts "ABC" as "NJQ" using NJQSUYBRXMOPFTHZVAWCGILKED as key
Log
running ./substitution NJQSUYBRXMOPFTHZVAWCGILKED...
sending input ABC...
checking for output "ciphertext: NJQ\n"...
checking that program exited with status 0...
:) encrypts "XyZ" as "KeD" using NJQSUYBRXMOPFTHZVAWCGILKED as key
Log
running ./substitution NJQSUYBRXMOPFTHZVAWCGILKED...
sending input XyZ...
checking for output "ciphertext: KeD\n"...
checking that program exited with status 0...
:) encrypts "This is CS50" as "Cbah ah KH50" using YUKFRNLBAVMWZTEOGXHCIPJSQD as key
Log
running ./substitution YUKFRNLBAVMWZTEOGXHCIPJSQD...
sending input This is CS50...
checking for output "ciphertext: Cbah ah KH50\n"...
checking that program exited with status 0...
:) encrypts "This is CS50" as "Cbah ah KH50" using yukfrnlbavmwzteogxhcipjsqd as key
Log
running ./substitution yukfrnlbavmwzteogxhcipjsqd...
sending input This is CS50...
checking for output "ciphertext: Cbah ah KH50\n"...
checking that program exited with status 0...
:) encrypts "This is CS50" as "Cbah ah KH50" using YUKFRNLBAVMWZteogxhcipjsqd as key
Log
running ./substitution YUKFRNLBAVMWZteogxhcipjsqd...
sending input This is CS50...
checking for output "ciphertext: Cbah ah KH50\n"...
checking that program exited with status 0...
:) encrypts all alphabetic characters using DWUSXNPQKEGCZFJBTLYROHIAVM as key
Log
running ./substitution DWUSXNPQKEGCZFJBTLYROHIAVM...
sending input The quick brown fox jumps over the lazy dog...
checking for output "ciphertext: Rqx tokug wljif nja eozby jhxl rqx cdmv sjp\n"...
checking that program exited with status 0...
:) does not encrypt non-alphabetical characters using DWUSXNPQKEGCZFJBTLYROHIAVM as key
Log
running ./substitution DWUSXNPQKEGCZFJBTLYROHIAVM...
sending input Shh... Don't tell!...
checking for output "ciphertext: Yqq... Sjf'r rxcc!\n"...
checking that program exited with status 0...
:) handles lack of key
Log
running ./substitution...
checking that program exited with status 1...
:) handles too many arguments
Log
running ./substitution abcdefghijklmnopqrstuvwxyz abc...
checking that program exited with status 1...
:) handles invalid key length
Log
running ./substitution QTXDGMKIPV...
checking that program exited with status 1...
:) handles invalid characters in key
Log
running ./substitution ZWGKPMJ^YISHFEXQON[DLUACVT...
checking that program exited with status 1...
:) handles duplicate characters in uppercase key
Log
running ./substitution FAZRDTMGQEJPWAXUSKVIYCLONH...
checking that program exited with status 1...
:) handles duplicate characters in lowercase key
Log
running ./substitution fazrdtmgqejpwaxuskviyclonh...
checking that program exited with status 1...