check50

cs50/problems/2024/x/caesar


:) caesar.c exists.

Log
checking that caesar.c exists...

:) caesar.c compiles.

Log
running clang caesar.c -o caesar -std=c11 -ggdb -lm -lcs50...

:) encrypts "a" as "b" using 1 as key

Log
running ./caesar 1...
sending input a...
checking for output "ciphertext: b\n"...
checking that program exited with status 0...

:) encrypts "barfoo" as "yxocll" using 23 as key

Log
running ./caesar 23...
sending input barfoo...
checking for output "ciphertext: yxocll\n"...
checking that program exited with status 0...

:) encrypts "BARFOO" as "EDUIRR" using 3 as key

Log
running ./caesar 3...
sending input BARFOO...
checking for output "ciphertext: EDUIRR\n"...
checking that program exited with status 0...

:) encrypts "BaRFoo" as "FeVJss" using 4 as key

Log
running ./caesar 4...
sending input BaRFoo...
checking for output "ciphertext: FeVJss\n"...
checking that program exited with status 0...

:) encrypts "barfoo" as "onesbb" using 65 as key

Log
running ./caesar 65...
sending input barfoo...
checking for output "ciphertext: onesbb\n"...
checking that program exited with status 0...

:) encrypts "world, say hello!" as "iadxp, emk tqxxa!" using 12 as key

Log
running ./caesar 12...
sending input world, say hello!...
checking for output "ciphertext: iadxp, emk tqxxa!\n"...
checking that program exited with status 0...

:) handles lack of argv[1]

Log
running ./caesar...
checking that program exited with status 1...

:) handles non-numeric key

Log
running ./caesar 2x...
checking that program exited with status 1...

:) handles too many arguments

Log
running ./caesar 1 2...
checking that program exited with status 1...