check50

cs50/problems/2019/x/vigenere


:) vigenere.c exists.

Log
checking that vigenere.c exists...

:) vigenere.c compiles.

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

:( encrypts "a" as "a" using "a" as keyword

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

Log
running ./vigenere a...
sending input a...
checking for output "ciphertext: a\n"...

Expected Output:
ciphertext: a\n
Actual Output:
ciphertext: a

:( encrypts "barfoo" as "caqgon" using "baz" as keyword

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

Log
running ./vigenere baz...
sending input barfoo...
checking for output "ciphertext: caqgon\n"...

Expected Output:
ciphertext: caqgon\n
Actual Output:
ciphertext: caqgon

:( encrypts "BaRFoo" as "CaQGon" using "BaZ" as keyword

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

Log
running ./vigenere BaZ...
sending input BaRFoo...
checking for output "ciphertext: CaQGon\n"...

Expected Output:
ciphertext: CaQGon\n
Actual Output:
ciphertext: CaQGon

:( encrypts "BARFOO" as "CAQGON" using "BAZ" as keyword

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

Log
running ./vigenere BAZ...
sending input BARFOO...
checking for output "ciphertext: CAQGON\n"...

Expected Output:
ciphertext: CAQGON\n
Actual Output:
ciphertext: CAQGON

:( encrypts "world!$?" as "xoqmd!$?" using "baz" as keyword

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

Log
running ./vigenere baz...
sending input world!$?...
checking for output "ciphertext: xoqmd!$?\n"...

Expected Output:
ciphertext: xoqmd!$?\n
Actual Output:
ciphertext: xoqmd!$?

:( encrypts "hello, world!" as "iekmo, vprke!" using "baz" as keyword

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

Log
running ./vigenere baz...
sending input hello, world!...
checking for output "ciphertext: iekmo, vprke!\n"...

Expected Output:
ciphertext: iekmo, vprke!\n
Actual Output:
ciphertext: iekmo, vprke!

:) handles lack of argv[1]

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

:) handles argc > 2

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

:) rejects "Hax0r2" as keyword

Log
running ./vigenere Hax0r2...
checking that program exited with status 1...