From c4c5715cb3e4973115de0be4b91e05806d1f4d9f Mon Sep 17 00:00:00 2001 From: Isaac Good Date: Mon, 24 Jun 2024 18:01:34 -0700 Subject: [PATCH] Sync new protein translation test case (#273) --- exercises/practice/protein-translation/.meta/tests.toml | 3 +++ .../protein-translation/test-protein-translation.bats | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/exercises/practice/protein-translation/.meta/tests.toml b/exercises/practice/protein-translation/.meta/tests.toml index 5fb1890..e27a6b4 100644 --- a/exercises/practice/protein-translation/.meta/tests.toml +++ b/exercises/practice/protein-translation/.meta/tests.toml @@ -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" diff --git a/exercises/practice/protein-translation/test-protein-translation.bats b/exercises/practice/protein-translation/test-protein-translation.bats index 1cb2915..224fb69 100644 --- a/exercises/practice/protein-translation/test-protein-translation.bats +++ b/exercises/practice/protein-translation/test-protein-translation.bats @@ -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"