check50

cs50/problems/2020/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

Cause
expected "ciphertext: b\...", not "ciphertext: b\..."

Log
running ./caesar 1...
sending input a...
checking for output "ciphertext: b\n"...

Expected Output:
ciphertext: b
Actual Output:
ciphertext: b

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

Cause
expected "ciphertext: yx...", not "ciphertext: yx..."

Log
running ./caesar 23...
sending input barfoo...
checking for output "ciphertext: yxocll\n"...

Expected Output:
ciphertext: yxocll
Actual Output:
ciphertext: yxocll

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

Cause
expected "ciphertext: ED...", not "ciphertext: ED..."

Log
running ./caesar 3...
sending input BARFOO...
checking for output "ciphertext: EDUIRR\n"...

Expected Output:
ciphertext: EDUIRR
Actual Output:
ciphertext: EDUIRR

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

Cause
expected "ciphertext: Fe...", not "ciphertext: Fe..."

Log
running ./caesar 4...
sending input BaRFoo...
checking for output "ciphertext: FeVJss\n"...

Expected Output:
ciphertext: FeVJss
Actual Output:
ciphertext: FeVJss

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

Cause
expected "ciphertext: on...", not "ciphertext: on..."

Log
running ./caesar 65...
sending input barfoo...
checking for output "ciphertext: onesbb\n"...

Expected Output:
ciphertext: onesbb
Actual Output:
ciphertext: onesbb

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

Cause
expected "ciphertext: ia...", not "ciphertext: ia..."

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

Expected Output:
ciphertext: iadxp, emk tqxxa!
Actual Output:
ciphertext: iadxp, emk tqxxa!

:) handles lack of key

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

:( handles non-numeric key

Cause
timed out while waiting for program to exit

Log
running ./caesar 2x...

:) handles too many arguments

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