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\n", not "Ciphertext: a\n"

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

Expected Output:
ciphertext: a
Actual Output:
Ciphertext: a

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

Cause
expected "ciphertext: caq...", not "Ciphertext: caq..."

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

Expected Output:
ciphertext: caqgon
Actual Output:
Ciphertext: caqgon

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

Cause
expected "ciphertext: CaQ...", not "Ciphertext: CaQ..."

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

Expected Output:
ciphertext: CaQGon
Actual Output:
Ciphertext: CaQGon

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

Cause
expected "ciphertext: CAQ...", not "Ciphertext: CAQ..."

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

Expected Output:
ciphertext: CAQGON
Actual Output:
Ciphertext: CAQGON

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

Cause
expected "ciphertext: xoq...", not "Ciphertext: xoq..."

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

Expected Output:
ciphertext: xoqmd!$?
Actual Output:
Ciphertext: xoqmd!$?

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

Cause
expected "ciphertext: iek...", not "Ciphertext: iek..."

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

Expected Output:
ciphertext: iekmo, vprke!
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...