Skip to content

Commit

Permalink
Sync new protein translation test case; sync docs and metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacG committed Jun 24, 2024
1 parent 4fa4872 commit b00a4fc
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exercises/practice/pig-latin/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For example:

## Rule 2

If a word begins with a one or more consonants, first move those consonants to the end of the word and then add an `"ay"` sound to the end of the word.
If a word begins with one or more consonants, first move those consonants to the end of the word and then add an `"ay"` sound to the end of the word.

For example:

Expand All @@ -33,7 +33,7 @@ If a word starts with zero or more consonants followed by `"qu"`, first move tho

For example:

- `"quick"` -> `"ickqu"` -> `"ay"` (starts with `"qu"`, no preceding consonants)
- `"quick"` -> `"ickqu"` -> `"ickquay"` (starts with `"qu"`, no preceding consonants)
- `"square"` -> `"aresqu"` -> `"aresquay"` (starts with one consonant followed by `"qu`")

## Rule 4
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/poker/.docs/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

Pick the best hand(s) from a list of poker hands.

See [wikipedia][poker-hands] for an overview of poker hands.
See [Wikipedia][poker-hands] for an overview of poker hands.

[poker-hands]: https://en.wikipedia.org/wiki/List_of_poker_hands
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 bash protein_translation.sh "AUGAUG"
assert_success
assert_output "Methionine Methionine"
}

@test "Error case" {
[[ $BATS_RUN_SKIPPED == "true" ]] || skip
run bash protein_translation.sh "UGG---AUG"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ The band colors are encoded as follows:
- White: 9

From the example above:
brown-green should return 15
brown-green should return 15, and
brown-green-violet should return 15 too, ignoring the third color.
2 changes: 1 addition & 1 deletion exercises/practice/yacht/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
]
},
"blurb": "Score a single throw of dice in the game Yacht.",
"source": "James Kilfiger, using wikipedia",
"source": "James Kilfiger, using Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Yacht_(dice_game)"
}

0 comments on commit b00a4fc

Please sign in to comment.