Skip to content

Commit

Permalink
Sync new protein translation test case (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacG authored Jun 25, 2024
1 parent 72ad8e8 commit c4c5715
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exercises/practice/protein-translation/.meta/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
description = "Translation stops if STOP codon in middle of six-codon sequence"

[f6f92714-769f-4187-9524-e353e8a41a80]
description = "Sequence of two non-STOP codons does not translate to a STOP codon"

[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
description = "Non-existing codon can't translate"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,13 @@ load bats-extra
assert_output "Tryptophan Cysteine Tyrosine"
}

@test "Sequence of two non-STOP codons does not translate to a STOP codon" {
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
run gawk -f protein-translation.awk <<< "AUGAUG"
assert_success
assert_output "Methionine Methionine"
}

@test "Error case" {
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
run gawk -f protein-translation.awk <<< "UGG---AUG"
Expand Down

0 comments on commit c4c5715

Please sign in to comment.