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.139 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.138 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.137 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.136 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.135 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.134 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.133 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.132 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.131 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.130 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.129 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.128 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.127 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.126 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.125 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.124 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.123 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.122 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.121 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh
trackler-2.2.1.120 tracks/bash/exercises/atbash-cipher/atbash_cipher_test.sh