Sha256: 40f3cf188333ded15060760d673dfd33d5e981db208a9398a90ba7baeadf6ce2

Contents?: true

Size: 1.71 KB

Versions: 133

Compression:

Stored size: 1.71 KB

Contents

#!/usr/bin/env bats

@test "encode yes" {
    run bash example.sh encode "yes"
    [ "$status" -eq 0 ]
    [ "$output" = "bvh" ]
}

@test "encode no" {
    run bash example.sh encode "no"
    [ "$status" -eq 0 ]
    [ "$output" = "ml" ]
}

@test "encode OMG" {
    run bash example.sh encode "OMG"
    [ "$status" -eq 0 ]
    [ "$output" = "lnt" ]
}

@test "encode spaces" {
    run bash example.sh encode "O M G"
    [ "$status" -eq 0 ]
    [ "$output" = "lnt" ]
}

@test "encode mindblowingly" {
    run bash example.sh encode "mindblowingly"
    [ "$status" -eq 0 ]
    [ "$output" = "nrmwy oldrm tob" ]
}

@test "encode numbers" {
    run bash example.sh encode "Testing,1 2 3, testing."
    [ "$status" -eq 0 ]
    [ "$output" = "gvhgr mt123 gvhgr mt" ]
}

@test "encode deep thought" {
    run bash example.sh encode "Truth is fiction."
    [ "$status" -eq 0 ]
    [ "$output" = "gifgs rhurx grlm" ]
}

@test "encode all the letters" {
    run bash example.sh encode "The quick brown fox jumps over the lazy dog."
    [ "$status" -eq 0 ]
    [ "$output" = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt" ]
}

@test "decode exercism" {
    run bash example.sh decode "vcvix rhn"
    [ "$status" -eq 0 ]
    [ "$output" = "exercism" ]
}

@test "decode a sentence" {
    run bash example.sh decode "zmlyh gzxov rhlug vmzhg vkkrm thglm v"
    [ "$status" -eq 0 ]
    [ "$output" = "anobstacleisoftenasteppingstone" ]
}

@test "decode numbers" {
    run bash example.sh decode "gvhgr mt123 gvhgr mt"
    [ "$status" -eq 0 ]
    [ "$output" = "testing123testing" ]
}

@test "decode all the letters" {
    run bash example.sh decode "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt"
    [ "$status" -eq 0 ]
    [ "$output" = "thequickbrownfoxjumpsoverthelazydog" ]
}

Version data entries

133 entries across 133 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.179 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.178 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.177 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.176 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.175 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.174 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.173 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.172 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.171 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.170 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.169 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.167 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.166 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.165 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.164 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.163 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.162 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.161 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.160 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh