From 79a2d5a5446c924844faa6916522cafddbefceb6 Mon Sep 17 00:00:00 2001 From: Bruno Raoult Date: Sat, 18 Sep 2021 08:06:40 +0900 Subject: [PATCH] test files: rename xxx_test.sh to xxx.bats, fix shebang (#541) * test files: rename xxx_test.sh to xxx.bats, fix shebang * pr.yml: remove md, add bats. * Fix a help file (thanks to Glenn) * Also trigger running tests for renamed files Co-authored-by: Glenn Jackman --- .github/workflows/pr.yml | 6 +++--- POLICIES.md | 2 +- bin/canonical_data_check | 2 +- bin/validate_one_exercise | 4 ++-- config.json | 2 +- docs/TESTS.md | 2 +- exercises/practice/acronym/.meta/config.json | 2 +- .../practice/acronym/{acronym_test.sh => acronym.bats} | 2 +- exercises/practice/affine-cipher/.meta/config.json | 2 +- .../{affine_cipher_test.sh => affine_cipher.bats} | 2 +- exercises/practice/all-your-base/.meta/config.json | 2 +- .../{all_your_base_test.sh => all_your_base.bats} | 2 +- exercises/practice/allergies/.meta/config.json | 2 +- .../allergies/{allergies_test.sh => allergies.bats} | 2 +- exercises/practice/anagram/.meta/config.json | 2 +- .../practice/anagram/{anagram_test.sh => anagram.bats} | 2 +- exercises/practice/armstrong-numbers/.meta/config.json | 2 +- ...rmstrong_numbers_test.sh => armstrong_numbers.bats} | 2 +- exercises/practice/atbash-cipher/.meta/config.json | 2 +- .../{atbash_cipher_test.sh => atbash_cipher.bats} | 2 +- exercises/practice/beer-song/.meta/config.json | 2 +- .../beer-song/{beer_song_test.sh => beer_song.bats} | 2 +- exercises/practice/binary-search/.meta/config.json | 2 +- .../{binary_search_test.sh => binary_search.bats} | 2 +- exercises/practice/bob/.meta/config.json | 2 +- exercises/practice/bob/{bob_test.sh => bob.bats} | 2 +- exercises/practice/bowling/.meta/config.json | 2 +- .../practice/bowling/{bowling_test.sh => bowling.bats} | 2 +- exercises/practice/change/.meta/config.json | 2 +- .../practice/change/{change_test.sh => change.bats} | 2 +- exercises/practice/clock/.meta/config.json | 2 +- exercises/practice/clock/{clock_test.sh => clock.bats} | 2 +- .../practice/collatz-conjecture/.meta/config.json | 2 +- ...latz_conjecture_test.sh => collatz_conjecture.bats} | 2 +- exercises/practice/crypto-square/.meta/config.json | 2 +- .../{crypto_square_test.sh => crypto_square.bats} | 2 +- exercises/practice/darts/.meta/config.json | 2 +- exercises/practice/darts/{darts_test.sh => darts.bats} | 2 +- exercises/practice/diamond/.meta/config.json | 2 +- .../practice/diamond/{diamond_test.sh => diamond.bats} | 2 +- .../practice/difference-of-squares/.meta/config.json | 2 +- ...e_of_squares_test.sh => difference_of_squares.bats} | 2 +- exercises/practice/diffie-hellman/.meta/config.json | 2 +- .../{diffie_hellman_test.sh => diffie_hellman.bats} | 2 +- exercises/practice/dnd-character/.meta/config.json | 2 +- .../{dnd_character_test.sh => dnd_character.bats} | 2 +- exercises/practice/error-handling/.meta/config.json | 2 +- .../{error_handling_test.sh => error_handling.bats} | 2 +- exercises/practice/food-chain/.meta/config.json | 2 +- .../food-chain/{food_chain_test.sh => food_chain.bats} | 2 +- exercises/practice/forth/.meta/config.json | 2 +- exercises/practice/forth/{forth_test.sh => forth.bats} | 2 +- exercises/practice/gigasecond/.meta/config.json | 2 +- .../gigasecond/{gigasecond_test.sh => gigasecond.bats} | 2 +- exercises/practice/grains/.meta/config.json | 2 +- .../practice/grains/{grains_test.sh => grains.bats} | 2 +- exercises/practice/grep/.meta/config.json | 2 +- exercises/practice/grep/{grep_test.sh => grep.bats} | 2 +- exercises/practice/hamming/.meta/config.json | 2 +- .../practice/hamming/{hamming_test.sh => hamming.bats} | 2 +- exercises/practice/hello-world/.meta/config.json | 2 +- .../{hello_world_test.sh => hello_world.bats} | 2 +- exercises/practice/house/.meta/config.json | 2 +- exercises/practice/house/{house_test.sh => house.bats} | 2 +- exercises/practice/isbn-verifier/.meta/config.json | 2 +- .../{isbn_verifier_test.sh => isbn_verifier.bats} | 2 +- exercises/practice/isogram/.meta/config.json | 2 +- .../practice/isogram/{isogram_test.sh => isogram.bats} | 2 +- .../practice/kindergarten-garden/.meta/config.json | 2 +- ...rgarten_garden_test.sh => kindergarten_garden.bats} | 2 +- exercises/practice/knapsack/.meta/config.json | 2 +- .../knapsack/{knapsack_test.sh => knapsack.bats} | 2 +- .../practice/largest-series-product/.meta/config.json | 2 +- ...ies_product_test.sh => largest_series_product.bats} | 2 +- exercises/practice/leap/.meta/config.json | 2 +- exercises/practice/leap/{leap_test.sh => leap.bats} | 2 +- exercises/practice/list-ops/.meta/config.json | 2 +- .../list-ops/{list_ops_test.sh => list_ops.bats} | 2 +- exercises/practice/luhn/.meta/config.json | 2 +- exercises/practice/luhn/{luhn_test.sh => luhn.bats} | 2 +- exercises/practice/markdown/.meta/config.json | 2 +- .../markdown/{markdown_test.sh => markdown.bats} | 2 +- exercises/practice/matching-brackets/.meta/config.json | 2 +- ...atching_brackets_test.sh => matching_brackets.bats} | 2 +- exercises/practice/meetup/.meta/config.json | 2 +- .../practice/meetup/{meetup_test.sh => meetup.bats} | 2 +- exercises/practice/nth-prime/.meta/config.json | 2 +- .../nth-prime/{nth_prime_test.sh => nth_prime.bats} | 2 +- exercises/practice/nucleotide-count/.meta/config.json | 2 +- ...{nucleotide_count_test.sh => nucleotide_count.bats} | 2 +- exercises/practice/ocr-numbers/.meta/config.json | 2 +- .../{ocr_numbers_test.sh => ocr_numbers.bats} | 2 +- .../practice/palindrome-products/.meta/config.json | 2 +- ...drome_products_test.sh => palindrome_products.bats} | 2 +- exercises/practice/pangram/.meta/config.json | 2 +- .../practice/pangram/{pangram_test.sh => pangram.bats} | 2 +- exercises/practice/pascals-triangle/.meta/config.json | 2 +- ...{pascals_triangle_test.sh => pascals_triangle.bats} | 2 +- exercises/practice/perfect-numbers/.meta/config.json | 2 +- .../{perfect_numbers_test.sh => perfect_numbers.bats} | 2 +- exercises/practice/phone-number/.meta/config.json | 2 +- .../{phone_number_test.sh => phone_number.bats} | 2 +- exercises/practice/pig-latin/.meta/config.json | 2 +- .../pig-latin/{pig_latin_test.sh => pig_latin.bats} | 2 +- exercises/practice/poker/.meta/config.json | 2 +- exercises/practice/poker/{poker_test.sh => poker.bats} | 2 +- exercises/practice/prime-factors/.meta/config.json | 2 +- .../{prime_factors_test.sh => prime_factors.bats} | 2 +- .../practice/protein-translation/.meta/config.json | 2 +- ...in_translation_test.sh => protein_translation.bats} | 2 +- exercises/practice/proverb/.meta/config.json | 2 +- .../practice/proverb/{proverb_test.sh => proverb.bats} | 2 +- .../practice/pythagorean-triplet/.meta/config.json | 2 +- ...gorean_triplet_test.sh => pythagorean_triplet.bats} | 2 +- exercises/practice/queen-attack/.meta/config.json | 2 +- .../{queen_attack_test.sh => queen_attack.bats} | 2 +- exercises/practice/rail-fence-cipher/.meta/config.json | 2 +- ...ail_fence_cipher_test.sh => rail_fence_cipher.bats} | 2 +- exercises/practice/raindrops/.meta/config.json | 2 +- .../raindrops/{raindrops_test.sh => raindrops.bats} | 2 +- exercises/practice/rational-numbers/.meta/config.json | 2 +- ...{rational_numbers_test.sh => rational_numbers.bats} | 2 +- exercises/practice/rectangles/.meta/config.json | 2 +- .../rectangles/{rectangles_test.sh => rectangles.bats} | 2 +- .../practice/resistor-color-duo/.meta/config.json | 2 +- ...istor_color_duo_test.sh => resistor_color_duo.bats} | 2 +- .../practice/resistor-color-trio/.meta/config.json | 2 +- ...tor_color_trio_test.sh => resistor_color_trio.bats} | 2 +- exercises/practice/reverse-string/.meta/config.json | 2 +- .../{reverse_string_test.sh => reverse_string.bats} | 2 +- exercises/practice/rna-transcription/.meta/config.json | 2 +- ...na_transcription_test.sh => rna_transcription.bats} | 2 +- exercises/practice/robot-simulator/.meta/config.json | 2 +- .../{robot_simulator_test.sh => robot_simulator.bats} | 2 +- exercises/practice/roman-numerals/.meta/config.json | 2 +- .../{roman_numerals_test.sh => roman_numerals.bats} | 2 +- exercises/practice/rotational-cipher/.meta/config.json | 2 +- ...otational_cipher_test.sh => rotational_cipher.bats} | 2 +- .../practice/run-length-encoding/.meta/config.json | 2 +- ...ength_encoding_test.sh => run_length_encoding.bats} | 2 +- exercises/practice/satellite/.meta/config.json | 2 +- .../satellite/{satellite_test.sh => satellite.bats} | 0 exercises/practice/say/.meta/config.json | 2 +- exercises/practice/say/{say_test.sh => say.bats} | 2 +- exercises/practice/scrabble-score/.meta/config.json | 2 +- .../{scrabble_score_test.sh => scrabble_score.bats} | 2 +- exercises/practice/secret-handshake/.meta/config.json | 2 +- ...{secret_handshake_test.sh => secret_handshake.bats} | 2 +- exercises/practice/series/.meta/config.json | 2 +- .../practice/series/{series_test.sh => series.bats} | 2 +- exercises/practice/sieve/.meta/config.json | 2 +- exercises/practice/sieve/{sieve_test.sh => sieve.bats} | 2 +- exercises/practice/simple-cipher/.meta/config.json | 2 +- .../{simple_cipher_test.sh => simple_cipher.bats} | 2 +- exercises/practice/space-age/.meta/config.json | 2 +- .../space-age/{space_age_test.sh => space_age.bats} | 2 +- exercises/practice/spiral-matrix/.meta/config.json | 2 +- .../{spiral_matrix_test.sh => spiral_matrix.bats} | 2 +- exercises/practice/square-root/.meta/config.json | 2 +- .../{square_root_test.sh => square_root.bats} | 2 +- exercises/practice/sublist/.meta/config.json | 2 +- .../practice/sublist/{sublist_test.sh => sublist.bats} | 2 +- exercises/practice/sum-of-multiples/.meta/config.json | 2 +- ...{sum_of_multiples_test.sh => sum_of_multiples.bats} | 2 +- exercises/practice/tournament/.meta/config.json | 2 +- .../tournament/{tournament_test.sh => tournament.bats} | 2 +- exercises/practice/transpose/.meta/config.json | 2 +- .../transpose/{transpose_test.sh => transpose.bats} | 2 +- exercises/practice/triangle/.meta/config.json | 2 +- .../triangle/{triangle_test.sh => triangle.bats} | 2 +- exercises/practice/twelve-days/.meta/config.json | 2 +- .../{twelve_days_test.sh => twelve_days.bats} | 2 +- exercises/practice/two-bucket/.meta/config.json | 2 +- .../two-bucket/{two_bucket_test.sh => two_bucket.bats} | 2 +- exercises/practice/two-fer/.meta/config.json | 2 +- .../practice/two-fer/{two_fer_test.sh => two_fer.bats} | 4 ++-- .../variable-length-quantity/.meta/config.json | 2 +- ..._quantity_test.sh => variable_length_quantity.bats} | 2 +- exercises/practice/word-count/.meta/config.json | 2 +- .../word-count/{word_count_test.sh => word_count.bats} | 2 +- exercises/practice/wordy/.meta/config.json | 2 +- exercises/practice/wordy/{wordy_test.sh => wordy.bats} | 2 +- exercises/practice/yacht/.meta/config.json | 2 +- exercises/practice/yacht/{yacht_test.sh => yacht.bats} | 2 +- exercises/shared/.docs/tests.md | 10 +++++----- mentor_tools/bantor | 2 +- 186 files changed, 193 insertions(+), 193 deletions(-) rename exercises/practice/acronym/{acronym_test.sh => acronym.bats} (98%) rename exercises/practice/affine-cipher/{affine_cipher_test.sh => affine_cipher.bats} (99%) rename exercises/practice/all-your-base/{all_your_base_test.sh => all_your_base.bats} (99%) rename exercises/practice/allergies/{allergies_test.sh => allergies.bats} (99%) rename exercises/practice/anagram/{anagram_test.sh => anagram.bats} (99%) rename exercises/practice/armstrong-numbers/{armstrong_numbers_test.sh => armstrong_numbers.bats} (98%) rename exercises/practice/atbash-cipher/{atbash_cipher_test.sh => atbash_cipher.bats} (99%) rename exercises/practice/beer-song/{beer_song_test.sh => beer_song.bats} (99%) rename exercises/practice/binary-search/{binary_search_test.sh => binary_search.bats} (99%) rename exercises/practice/bob/{bob_test.sh => bob.bats} (99%) rename exercises/practice/bowling/{bowling_test.sh => bowling.bats} (99%) rename exercises/practice/change/{change_test.sh => change.bats} (99%) rename exercises/practice/clock/{clock_test.sh => clock.bats} (99%) rename exercises/practice/collatz-conjecture/{collatz_conjecture_test.sh => collatz_conjecture.bats} (98%) rename exercises/practice/crypto-square/{crypto_square_test.sh => crypto_square.bats} (98%) rename exercises/practice/darts/{darts_test.sh => darts.bats} (99%) rename exercises/practice/diamond/{diamond_test.sh => diamond.bats} (99%) rename exercises/practice/difference-of-squares/{difference_of_squares_test.sh => difference_of_squares.bats} (98%) rename exercises/practice/diffie-hellman/{diffie_hellman_test.sh => diffie_hellman.bats} (99%) rename exercises/practice/dnd-character/{dnd_character_test.sh => dnd_character.bats} (99%) rename exercises/practice/error-handling/{error_handling_test.sh => error_handling.bats} (97%) rename exercises/practice/food-chain/{food_chain_test.sh => food_chain.bats} (99%) rename exercises/practice/forth/{forth_test.sh => forth.bats} (99%) rename exercises/practice/gigasecond/{gigasecond_test.sh => gigasecond.bats} (98%) rename exercises/practice/grains/{grains_test.sh => grains.bats} (98%) rename exercises/practice/grep/{grep_test.sh => grep.bats} (99%) rename exercises/practice/hamming/{hamming_test.sh => hamming.bats} (99%) rename exercises/practice/hello-world/{hello_world_test.sh => hello_world.bats} (92%) rename exercises/practice/house/{house_test.sh => house.bats} (99%) rename exercises/practice/isbn-verifier/{isbn_verifier_test.sh => isbn_verifier.bats} (99%) rename exercises/practice/isogram/{isogram_test.sh => isogram.bats} (99%) rename exercises/practice/kindergarten-garden/{kindergarten_garden_test.sh => kindergarten_garden.bats} (99%) rename exercises/practice/knapsack/{knapsack_test.sh => knapsack.bats} (98%) rename exercises/practice/largest-series-product/{largest_series_product_test.sh => largest_series_product.bats} (99%) rename exercises/practice/leap/{leap_test.sh => leap.bats} (99%) rename exercises/practice/list-ops/{list_ops_test.sh => list_ops.bats} (99%) rename exercises/practice/luhn/{luhn_test.sh => luhn.bats} (99%) rename exercises/practice/markdown/{markdown_test.sh => markdown.bats} (99%) rename exercises/practice/matching-brackets/{matching_brackets_test.sh => matching_brackets.bats} (99%) rename exercises/practice/meetup/{meetup_test.sh => meetup.bats} (99%) rename exercises/practice/nth-prime/{nth_prime_test.sh => nth_prime.bats} (98%) rename exercises/practice/nucleotide-count/{nucleotide_count_test.sh => nucleotide_count.bats} (98%) rename exercises/practice/ocr-numbers/{ocr_numbers_test.sh => ocr_numbers.bats} (99%) rename exercises/practice/palindrome-products/{palindrome_products_test.sh => palindrome_products.bats} (99%) rename exercises/practice/pangram/{pangram_test.sh => pangram.bats} (98%) rename exercises/practice/pascals-triangle/{pascals_triangle_test.sh => pascals_triangle.bats} (99%) rename exercises/practice/perfect-numbers/{perfect_numbers_test.sh => perfect_numbers.bats} (99%) rename exercises/practice/phone-number/{phone_number_test.sh => phone_number.bats} (99%) rename exercises/practice/pig-latin/{pig_latin_test.sh => pig_latin.bats} (99%) rename exercises/practice/poker/{poker_test.sh => poker.bats} (99%) rename exercises/practice/prime-factors/{prime_factors_test.sh => prime_factors.bats} (99%) rename exercises/practice/protein-translation/{protein_translation_test.sh => protein_translation.bats} (99%) rename exercises/practice/proverb/{proverb_test.sh => proverb.bats} (99%) rename exercises/practice/pythagorean-triplet/{pythagorean_triplet_test.sh => pythagorean_triplet.bats} (99%) rename exercises/practice/queen-attack/{queen_attack_test.sh => queen_attack.bats} (99%) rename exercises/practice/rail-fence-cipher/{rail_fence_cipher_test.sh => rail_fence_cipher.bats} (99%) rename exercises/practice/raindrops/{raindrops_test.sh => raindrops.bats} (99%) rename exercises/practice/rational-numbers/{rational_numbers_test.sh => rational_numbers.bats} (99%) rename exercises/practice/rectangles/{rectangles_test.sh => rectangles.bats} (99%) rename exercises/practice/resistor-color-duo/{resistor_color_duo_test.sh => resistor_color_duo.bats} (98%) rename exercises/practice/resistor-color-trio/{resistor_color_trio_test.sh => resistor_color_trio.bats} (99%) rename exercises/practice/reverse-string/{reverse_string_test.sh => reverse_string.bats} (98%) rename exercises/practice/rna-transcription/{rna_transcription_test.sh => rna_transcription.bats} (98%) rename exercises/practice/robot-simulator/{robot_simulator_test.sh => robot_simulator.bats} (99%) rename exercises/practice/roman-numerals/{roman_numerals_test.sh => roman_numerals.bats} (99%) rename exercises/practice/rotational-cipher/{rotational_cipher_test.sh => rotational_cipher.bats} (99%) rename exercises/practice/run-length-encoding/{run_length_encoding_test.sh => run_length_encoding.bats} (99%) rename exercises/practice/satellite/{satellite_test.sh => satellite.bats} (100%) rename exercises/practice/say/{say_test.sh => say.bats} (99%) rename exercises/practice/scrabble-score/{scrabble_score_test.sh => scrabble_score.bats} (98%) rename exercises/practice/secret-handshake/{secret_handshake_test.sh => secret_handshake.bats} (98%) rename exercises/practice/series/{series_test.sh => series.bats} (99%) rename exercises/practice/sieve/{sieve_test.sh => sieve.bats} (98%) rename exercises/practice/simple-cipher/{simple_cipher_test.sh => simple_cipher.bats} (99%) rename exercises/practice/space-age/{space_age_test.sh => space_age.bats} (98%) rename exercises/practice/spiral-matrix/{spiral_matrix_test.sh => spiral_matrix.bats} (98%) rename exercises/practice/square-root/{square_root_test.sh => square_root.bats} (97%) rename exercises/practice/sublist/{sublist_test.sh => sublist.bats} (99%) rename exercises/practice/sum-of-multiples/{sum_of_multiples_test.sh => sum_of_multiples.bats} (99%) rename exercises/practice/tournament/{tournament_test.sh => tournament.bats} (99%) rename exercises/practice/transpose/{transpose_test.sh => transpose.bats} (99%) rename exercises/practice/triangle/{triangle_test.sh => triangle.bats} (99%) rename exercises/practice/twelve-days/{twelve_days_test.sh => twelve_days.bats} (99%) rename exercises/practice/two-bucket/{two_bucket_test.sh => two_bucket.bats} (99%) rename exercises/practice/two-fer/{two_fer_test.sh => two_fer.bats} (95%) rename exercises/practice/variable-length-quantity/{variable_length_quantity_test.sh => variable_length_quantity.bats} (99%) rename exercises/practice/word-count/{word_count_test.sh => word_count.bats} (99%) rename exercises/practice/wordy/{wordy_test.sh => wordy.bats} (99%) rename exercises/practice/yacht/{yacht_test.sh => yacht.bats} (99%) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 28684c9e..3dbe8956 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -22,8 +22,8 @@ jobs: run: | pr_endpoint=$(jq -r '"repos/\(.repository.full_name)/pulls/\(.pull_request.number)"' "$GITHUB_EVENT_PATH") gh api "$pr_endpoint/files" --paginate --jq ' - .[] | - select(.status == "added" or .status == "modified") | - select(.filename | match("\\.(md|sh|bash)$")) | + .[] | + select(.status == "added" or .status == "modified" or .status == "renamed") | + select(.filename | match("\\.(sh|bash|bats)$")) | .filename ' | xargs -r bash .github/scripts/pr diff --git a/POLICIES.md b/POLICIES.md index 6c3905a2..d9c167db 100644 --- a/POLICIES.md +++ b/POLICIES.md @@ -41,7 +41,7 @@ document, which thoroughly discusses the structure of an exercise. ### Exercise Test Structure -The tests will not enforce using a specific function, unless the problems are complex or requires it (ex: https://github.com/exercism/bash/blob/main/exercises/practice/list-ops/list_ops_test.sh) +The tests will not enforce using a specific function, unless the problems are complex or requires it (ex: https://github.com/exercism/bash/blob/main/exercises/practice/list-ops/list_ops.bats) ``` run bash exercise.sh "string" diff --git a/bin/canonical_data_check b/bin/canonical_data_check index 16d2f496..ac4fc396 100755 --- a/bin/canonical_data_check +++ b/bin/canonical_data_check @@ -81,7 +81,7 @@ do echo "$slug: needs update (v$track_data_version -> v$canonical_data_version)." fi - test_file="$path_to_track/exercises/$slug/${slug//-/_}_test.sh" + test_file="$path_to_track/exercises/$slug/${slug//-/_}.bats" test_file_version=$( awk '/# local version: / {print $NF}' "$test_file" ) # the test file version number must include the .meta diff --git a/bin/validate_one_exercise b/bin/validate_one_exercise index 37b27497..7fefe878 100755 --- a/bin/validate_one_exercise +++ b/bin/validate_one_exercise @@ -18,7 +18,7 @@ exercise_name=${exercise//-/_} # replace "-" with "_" to follow convention solution="./.meta/example.sh" [[ -f ${exercise_name}.sh ]] || die "Missing stub file for $exercise" -[[ -f ${exercise_name}_test.sh ]] || die "Missing tests file for $exercise" +[[ -f ${exercise_name}.bats ]] || die "Missing tests file for $exercise" [[ -f ${solution} ]] || die "Missing solution file for $exercise" echo "Processing $exercise" @@ -32,4 +32,4 @@ trap cleanup EXIT cp "${solution}" "${exercise_name}.sh" # Run the tests -bats "${exercise_name}_test.sh" +bats "${exercise_name}.bats" diff --git a/config.json b/config.json index b072f09b..6397120f 100644 --- a/config.json +++ b/config.json @@ -23,7 +23,7 @@ "%{snake_slug}.sh" ], "test": [ - "%{snake_slug}_test.sh" + "%{snake_slug}.bats" ], "example": [ ".meta/example.sh" diff --git a/docs/TESTS.md b/docs/TESTS.md index 4a19a161..c19d8d5e 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -7,7 +7,7 @@ leader in the bash testing area. For these examples we are using Run the tests for the hypothetical "whatever" exercise like this: ```bash cd /path/to/your/exercise_workspace/bash/whatever -bats whatever_test.sh +bats whatever.bats ``` For help on the meaning of the various `assert*` commands in the diff --git a/exercises/practice/acronym/.meta/config.json b/exercises/practice/acronym/.meta/config.json index 9a2da947..87345c90 100644 --- a/exercises/practice/acronym/.meta/config.json +++ b/exercises/practice/acronym/.meta/config.json @@ -19,7 +19,7 @@ "acronym.sh" ], "test": [ - "acronym_test.sh" + "acronym.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/acronym/acronym_test.sh b/exercises/practice/acronym/acronym.bats similarity index 98% rename from exercises/practice/acronym/acronym_test.sh rename to exercises/practice/acronym/acronym.bats index ab207a7d..58566b4a 100644 --- a/exercises/practice/acronym/acronym_test.sh +++ b/exercises/practice/acronym/acronym.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.7.0.1 diff --git a/exercises/practice/affine-cipher/.meta/config.json b/exercises/practice/affine-cipher/.meta/config.json index 222cbf1e..902f10c9 100644 --- a/exercises/practice/affine-cipher/.meta/config.json +++ b/exercises/practice/affine-cipher/.meta/config.json @@ -15,7 +15,7 @@ "affine_cipher.sh" ], "test": [ - "affine_cipher_test.sh" + "affine_cipher.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/affine-cipher/affine_cipher_test.sh b/exercises/practice/affine-cipher/affine_cipher.bats similarity index 99% rename from exercises/practice/affine-cipher/affine_cipher_test.sh rename to exercises/practice/affine-cipher/affine_cipher.bats index 7ae088f4..41adad0e 100644 --- a/exercises/practice/affine-cipher/affine_cipher_test.sh +++ b/exercises/practice/affine-cipher/affine_cipher.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.0 diff --git a/exercises/practice/all-your-base/.meta/config.json b/exercises/practice/all-your-base/.meta/config.json index efb02e15..bd985e12 100644 --- a/exercises/practice/all-your-base/.meta/config.json +++ b/exercises/practice/all-your-base/.meta/config.json @@ -14,7 +14,7 @@ "all_your_base.sh" ], "test": [ - "all_your_base_test.sh" + "all_your_base.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/all-your-base/all_your_base_test.sh b/exercises/practice/all-your-base/all_your_base.bats similarity index 99% rename from exercises/practice/all-your-base/all_your_base_test.sh rename to exercises/practice/all-your-base/all_your_base.bats index b9297e65..c5335119 100644 --- a/exercises/practice/all-your-base/all_your_base_test.sh +++ b/exercises/practice/all-your-base/all_your_base.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.3.0.0 diff --git a/exercises/practice/allergies/.meta/config.json b/exercises/practice/allergies/.meta/config.json index 8cff13df..5d7ca5cb 100644 --- a/exercises/practice/allergies/.meta/config.json +++ b/exercises/practice/allergies/.meta/config.json @@ -14,7 +14,7 @@ "allergies.sh" ], "test": [ - "allergies_test.sh" + "allergies.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/allergies/allergies_test.sh b/exercises/practice/allergies/allergies.bats similarity index 99% rename from exercises/practice/allergies/allergies_test.sh rename to exercises/practice/allergies/allergies.bats index ef5b6017..d7476663 100644 --- a/exercises/practice/allergies/allergies_test.sh +++ b/exercises/practice/allergies/allergies.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.0 diff --git a/exercises/practice/anagram/.meta/config.json b/exercises/practice/anagram/.meta/config.json index 8592df95..1d20d078 100644 --- a/exercises/practice/anagram/.meta/config.json +++ b/exercises/practice/anagram/.meta/config.json @@ -19,7 +19,7 @@ "anagram.sh" ], "test": [ - "anagram_test.sh" + "anagram.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/anagram/anagram_test.sh b/exercises/practice/anagram/anagram.bats similarity index 99% rename from exercises/practice/anagram/anagram_test.sh rename to exercises/practice/anagram/anagram.bats index 41047cce..200d987a 100644 --- a/exercises/practice/anagram/anagram_test.sh +++ b/exercises/practice/anagram/anagram.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.5.0.0 diff --git a/exercises/practice/armstrong-numbers/.meta/config.json b/exercises/practice/armstrong-numbers/.meta/config.json index f7faeca7..9c61ff88 100644 --- a/exercises/practice/armstrong-numbers/.meta/config.json +++ b/exercises/practice/armstrong-numbers/.meta/config.json @@ -18,7 +18,7 @@ "armstrong_numbers.sh" ], "test": [ - "armstrong_numbers_test.sh" + "armstrong_numbers.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/armstrong-numbers/armstrong_numbers_test.sh b/exercises/practice/armstrong-numbers/armstrong_numbers.bats similarity index 98% rename from exercises/practice/armstrong-numbers/armstrong_numbers_test.sh rename to exercises/practice/armstrong-numbers/armstrong_numbers.bats index 70f9a377..4a370d68 100644 --- a/exercises/practice/armstrong-numbers/armstrong_numbers_test.sh +++ b/exercises/practice/armstrong-numbers/armstrong_numbers.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/atbash-cipher/.meta/config.json b/exercises/practice/atbash-cipher/.meta/config.json index bc39d0a4..177fab85 100644 --- a/exercises/practice/atbash-cipher/.meta/config.json +++ b/exercises/practice/atbash-cipher/.meta/config.json @@ -18,7 +18,7 @@ "atbash_cipher.sh" ], "test": [ - "atbash_cipher_test.sh" + "atbash_cipher.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/atbash-cipher/atbash_cipher_test.sh b/exercises/practice/atbash-cipher/atbash_cipher.bats similarity index 99% rename from exercises/practice/atbash-cipher/atbash_cipher_test.sh rename to exercises/practice/atbash-cipher/atbash_cipher.bats index f856888d..d5624e94 100644 --- a/exercises/practice/atbash-cipher/atbash_cipher_test.sh +++ b/exercises/practice/atbash-cipher/atbash_cipher.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/beer-song/.meta/config.json b/exercises/practice/beer-song/.meta/config.json index aac4cd8e..85ec0dd6 100644 --- a/exercises/practice/beer-song/.meta/config.json +++ b/exercises/practice/beer-song/.meta/config.json @@ -14,7 +14,7 @@ "beer_song.sh" ], "test": [ - "beer_song_test.sh" + "beer_song.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/beer-song/beer_song_test.sh b/exercises/practice/beer-song/beer_song.bats similarity index 99% rename from exercises/practice/beer-song/beer_song_test.sh rename to exercises/practice/beer-song/beer_song.bats index c9a45432..f7be8481 100644 --- a/exercises/practice/beer-song/beer_song_test.sh +++ b/exercises/practice/beer-song/beer_song.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.1.0.1 diff --git a/exercises/practice/binary-search/.meta/config.json b/exercises/practice/binary-search/.meta/config.json index 64955d06..cb952cd4 100644 --- a/exercises/practice/binary-search/.meta/config.json +++ b/exercises/practice/binary-search/.meta/config.json @@ -14,7 +14,7 @@ "binary_search.sh" ], "test": [ - "binary_search_test.sh" + "binary_search.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/binary-search/binary_search_test.sh b/exercises/practice/binary-search/binary_search.bats similarity index 99% rename from exercises/practice/binary-search/binary_search_test.sh rename to exercises/practice/binary-search/binary_search.bats index 5525a41e..cf70dbe5 100644 --- a/exercises/practice/binary-search/binary_search_test.sh +++ b/exercises/practice/binary-search/binary_search.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.3.0.0 diff --git a/exercises/practice/bob/.meta/config.json b/exercises/practice/bob/.meta/config.json index f9fbe190..1f930315 100644 --- a/exercises/practice/bob/.meta/config.json +++ b/exercises/practice/bob/.meta/config.json @@ -22,7 +22,7 @@ "bob.sh" ], "test": [ - "bob_test.sh" + "bob.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/bob/bob_test.sh b/exercises/practice/bob/bob.bats similarity index 99% rename from exercises/practice/bob/bob_test.sh rename to exercises/practice/bob/bob.bats index e49aee50..52354eb8 100644 --- a/exercises/practice/bob/bob_test.sh +++ b/exercises/practice/bob/bob.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.6.0.0 diff --git a/exercises/practice/bowling/.meta/config.json b/exercises/practice/bowling/.meta/config.json index 647a890e..4748a8a8 100644 --- a/exercises/practice/bowling/.meta/config.json +++ b/exercises/practice/bowling/.meta/config.json @@ -13,7 +13,7 @@ "bowling.sh" ], "test": [ - "bowling_test.sh" + "bowling.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/bowling/bowling_test.sh b/exercises/practice/bowling/bowling.bats similarity index 99% rename from exercises/practice/bowling/bowling_test.sh rename to exercises/practice/bowling/bowling.bats index f3489d08..671e86a6 100644 --- a/exercises/practice/bowling/bowling_test.sh +++ b/exercises/practice/bowling/bowling.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/change/.meta/config.json b/exercises/practice/change/.meta/config.json index 164183b5..27266cf2 100644 --- a/exercises/practice/change/.meta/config.json +++ b/exercises/practice/change/.meta/config.json @@ -14,7 +14,7 @@ "change.sh" ], "test": [ - "change_test.sh" + "change.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/change/change_test.sh b/exercises/practice/change/change.bats similarity index 99% rename from exercises/practice/change/change_test.sh rename to exercises/practice/change/change.bats index ab4631c9..043da391 100644 --- a/exercises/practice/change/change_test.sh +++ b/exercises/practice/change/change.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.3.0.0 diff --git a/exercises/practice/clock/.meta/config.json b/exercises/practice/clock/.meta/config.json index cce61b4a..2c96b3c1 100644 --- a/exercises/practice/clock/.meta/config.json +++ b/exercises/practice/clock/.meta/config.json @@ -12,7 +12,7 @@ "clock.sh" ], "test": [ - "clock_test.sh" + "clock.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/clock/clock_test.sh b/exercises/practice/clock/clock.bats similarity index 99% rename from exercises/practice/clock/clock_test.sh rename to exercises/practice/clock/clock.bats index f4881d5e..891f1833 100644 --- a/exercises/practice/clock/clock_test.sh +++ b/exercises/practice/clock/clock.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.4.0.1 diff --git a/exercises/practice/collatz-conjecture/.meta/config.json b/exercises/practice/collatz-conjecture/.meta/config.json index c03491af..fc657a8b 100644 --- a/exercises/practice/collatz-conjecture/.meta/config.json +++ b/exercises/practice/collatz-conjecture/.meta/config.json @@ -17,7 +17,7 @@ "collatz_conjecture.sh" ], "test": [ - "collatz_conjecture_test.sh" + "collatz_conjecture.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/collatz-conjecture/collatz_conjecture_test.sh b/exercises/practice/collatz-conjecture/collatz_conjecture.bats similarity index 98% rename from exercises/practice/collatz-conjecture/collatz_conjecture_test.sh rename to exercises/practice/collatz-conjecture/collatz_conjecture.bats index 7b0f26fd..257df3a9 100644 --- a/exercises/practice/collatz-conjecture/collatz_conjecture_test.sh +++ b/exercises/practice/collatz-conjecture/collatz_conjecture.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.1.0 diff --git a/exercises/practice/crypto-square/.meta/config.json b/exercises/practice/crypto-square/.meta/config.json index 95b06d89..4e81b346 100644 --- a/exercises/practice/crypto-square/.meta/config.json +++ b/exercises/practice/crypto-square/.meta/config.json @@ -12,7 +12,7 @@ "crypto_square.sh" ], "test": [ - "crypto_square_test.sh" + "crypto_square.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/crypto-square/crypto_square_test.sh b/exercises/practice/crypto-square/crypto_square.bats similarity index 98% rename from exercises/practice/crypto-square/crypto_square_test.sh rename to exercises/practice/crypto-square/crypto_square.bats index 8f2cdc63..ce18aebc 100644 --- a/exercises/practice/crypto-square/crypto_square_test.sh +++ b/exercises/practice/crypto-square/crypto_square.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 3.2.0.0 diff --git a/exercises/practice/darts/.meta/config.json b/exercises/practice/darts/.meta/config.json index 2423a8f7..12214865 100644 --- a/exercises/practice/darts/.meta/config.json +++ b/exercises/practice/darts/.meta/config.json @@ -12,7 +12,7 @@ "darts.sh" ], "test": [ - "darts_test.sh" + "darts.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/darts/darts_test.sh b/exercises/practice/darts/darts.bats similarity index 99% rename from exercises/practice/darts/darts_test.sh rename to exercises/practice/darts/darts.bats index e678f096..b7da749c 100644 --- a/exercises/practice/darts/darts_test.sh +++ b/exercises/practice/darts/darts.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.2.0.1 diff --git a/exercises/practice/diamond/.meta/config.json b/exercises/practice/diamond/.meta/config.json index 9e5ac6db..3e3e08cc 100644 --- a/exercises/practice/diamond/.meta/config.json +++ b/exercises/practice/diamond/.meta/config.json @@ -15,7 +15,7 @@ "diamond.sh" ], "test": [ - "diamond_test.sh" + "diamond.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/diamond/diamond_test.sh b/exercises/practice/diamond/diamond.bats similarity index 99% rename from exercises/practice/diamond/diamond_test.sh rename to exercises/practice/diamond/diamond.bats index 992b1d7a..3463a542 100644 --- a/exercises/practice/diamond/diamond_test.sh +++ b/exercises/practice/diamond/diamond.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/difference-of-squares/.meta/config.json b/exercises/practice/difference-of-squares/.meta/config.json index 66735a11..b7aa37c3 100644 --- a/exercises/practice/difference-of-squares/.meta/config.json +++ b/exercises/practice/difference-of-squares/.meta/config.json @@ -20,7 +20,7 @@ "difference_of_squares.sh" ], "test": [ - "difference_of_squares_test.sh" + "difference_of_squares.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/difference-of-squares/difference_of_squares_test.sh b/exercises/practice/difference-of-squares/difference_of_squares.bats similarity index 98% rename from exercises/practice/difference-of-squares/difference_of_squares_test.sh rename to exercises/practice/difference-of-squares/difference_of_squares.bats index 387d3106..f7f39e89 100644 --- a/exercises/practice/difference-of-squares/difference_of_squares_test.sh +++ b/exercises/practice/difference-of-squares/difference_of_squares.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/diffie-hellman/.meta/config.json b/exercises/practice/diffie-hellman/.meta/config.json index 0797b417..4228cce6 100644 --- a/exercises/practice/diffie-hellman/.meta/config.json +++ b/exercises/practice/diffie-hellman/.meta/config.json @@ -14,7 +14,7 @@ "diffie_hellman.sh" ], "test": [ - "diffie_hellman_test.sh" + "diffie_hellman.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/diffie-hellman/diffie_hellman_test.sh b/exercises/practice/diffie-hellman/diffie_hellman.bats similarity index 99% rename from exercises/practice/diffie-hellman/diffie_hellman_test.sh rename to exercises/practice/diffie-hellman/diffie_hellman.bats index 84b63bce..7139d162 100644 --- a/exercises/practice/diffie-hellman/diffie_hellman_test.sh +++ b/exercises/practice/diffie-hellman/diffie_hellman.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.0.0.0 diff --git a/exercises/practice/dnd-character/.meta/config.json b/exercises/practice/dnd-character/.meta/config.json index a739cc57..09b7d604 100644 --- a/exercises/practice/dnd-character/.meta/config.json +++ b/exercises/practice/dnd-character/.meta/config.json @@ -12,7 +12,7 @@ "dnd_character.sh" ], "test": [ - "dnd_character_test.sh" + "dnd_character.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/dnd-character/dnd_character_test.sh b/exercises/practice/dnd-character/dnd_character.bats similarity index 99% rename from exercises/practice/dnd-character/dnd_character_test.sh rename to exercises/practice/dnd-character/dnd_character.bats index 57f9c389..0f6bffc4 100644 --- a/exercises/practice/dnd-character/dnd_character_test.sh +++ b/exercises/practice/dnd-character/dnd_character.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/error-handling/.meta/config.json b/exercises/practice/error-handling/.meta/config.json index 03e7bc92..e55ad284 100644 --- a/exercises/practice/error-handling/.meta/config.json +++ b/exercises/practice/error-handling/.meta/config.json @@ -21,7 +21,7 @@ "error_handling.sh" ], "test": [ - "error_handling_test.sh" + "error_handling.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/error-handling/error_handling_test.sh b/exercises/practice/error-handling/error_handling.bats similarity index 97% rename from exercises/practice/error-handling/error_handling_test.sh rename to exercises/practice/error-handling/error_handling.bats index 4478db33..08e5ad6d 100644 --- a/exercises/practice/error-handling/error_handling_test.sh +++ b/exercises/practice/error-handling/error_handling.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 0.0.1 diff --git a/exercises/practice/food-chain/.meta/config.json b/exercises/practice/food-chain/.meta/config.json index b6dd0445..317056b4 100644 --- a/exercises/practice/food-chain/.meta/config.json +++ b/exercises/practice/food-chain/.meta/config.json @@ -14,7 +14,7 @@ "food_chain.sh" ], "test": [ - "food_chain_test.sh" + "food_chain.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/food-chain/food_chain_test.sh b/exercises/practice/food-chain/food_chain.bats similarity index 99% rename from exercises/practice/food-chain/food_chain_test.sh rename to exercises/practice/food-chain/food_chain.bats index 2a683a91..95173a28 100644 --- a/exercises/practice/food-chain/food_chain_test.sh +++ b/exercises/practice/food-chain/food_chain.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.1.0.0 diff --git a/exercises/practice/forth/.meta/config.json b/exercises/practice/forth/.meta/config.json index e79659a4..77df896b 100644 --- a/exercises/practice/forth/.meta/config.json +++ b/exercises/practice/forth/.meta/config.json @@ -14,7 +14,7 @@ "forth.sh" ], "test": [ - "forth_test.sh" + "forth.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/forth/forth_test.sh b/exercises/practice/forth/forth.bats similarity index 99% rename from exercises/practice/forth/forth_test.sh rename to exercises/practice/forth/forth.bats index a4269d51..a7f829a6 100644 --- a/exercises/practice/forth/forth_test.sh +++ b/exercises/practice/forth/forth.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.7.1.0 diff --git a/exercises/practice/gigasecond/.meta/config.json b/exercises/practice/gigasecond/.meta/config.json index e0f2d815..e2eb8abd 100644 --- a/exercises/practice/gigasecond/.meta/config.json +++ b/exercises/practice/gigasecond/.meta/config.json @@ -21,7 +21,7 @@ "gigasecond.sh" ], "test": [ - "gigasecond_test.sh" + "gigasecond.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/gigasecond/gigasecond_test.sh b/exercises/practice/gigasecond/gigasecond.bats similarity index 98% rename from exercises/practice/gigasecond/gigasecond_test.sh rename to exercises/practice/gigasecond/gigasecond.bats index bc7073a8..2eb256b2 100644 --- a/exercises/practice/gigasecond/gigasecond_test.sh +++ b/exercises/practice/gigasecond/gigasecond.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.0 diff --git a/exercises/practice/grains/.meta/config.json b/exercises/practice/grains/.meta/config.json index 39d9c9a6..61d0374c 100644 --- a/exercises/practice/grains/.meta/config.json +++ b/exercises/practice/grains/.meta/config.json @@ -17,7 +17,7 @@ "grains.sh" ], "test": [ - "grains_test.sh" + "grains.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/grains/grains_test.sh b/exercises/practice/grains/grains.bats similarity index 98% rename from exercises/practice/grains/grains_test.sh rename to exercises/practice/grains/grains.bats index 5ed6b14f..ac08e14d 100644 --- a/exercises/practice/grains/grains_test.sh +++ b/exercises/practice/grains/grains.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/grep/.meta/config.json b/exercises/practice/grep/.meta/config.json index 92f30176..5c136699 100644 --- a/exercises/practice/grep/.meta/config.json +++ b/exercises/practice/grep/.meta/config.json @@ -14,7 +14,7 @@ "grep.sh" ], "test": [ - "grep_test.sh" + "grep.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/grep/grep_test.sh b/exercises/practice/grep/grep.bats similarity index 99% rename from exercises/practice/grep/grep_test.sh rename to exercises/practice/grep/grep.bats index b399f80c..03937dcc 100644 --- a/exercises/practice/grep/grep_test.sh +++ b/exercises/practice/grep/grep.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/hamming/.meta/config.json b/exercises/practice/hamming/.meta/config.json index 2caff7a0..5840a59e 100644 --- a/exercises/practice/hamming/.meta/config.json +++ b/exercises/practice/hamming/.meta/config.json @@ -22,7 +22,7 @@ "hamming.sh" ], "test": [ - "hamming_test.sh" + "hamming.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/hamming/hamming_test.sh b/exercises/practice/hamming/hamming.bats similarity index 99% rename from exercises/practice/hamming/hamming_test.sh rename to exercises/practice/hamming/hamming.bats index ac45a4b7..4aacf9a3 100644 --- a/exercises/practice/hamming/hamming_test.sh +++ b/exercises/practice/hamming/hamming.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.3.0.3 diff --git a/exercises/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index 7c9979ca..f5b03960 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -25,7 +25,7 @@ "hello_world.sh" ], "test": [ - "hello_world_test.sh" + "hello_world.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/hello-world/hello_world_test.sh b/exercises/practice/hello-world/hello_world.bats similarity index 92% rename from exercises/practice/hello-world/hello_world_test.sh rename to exercises/practice/hello-world/hello_world.bats index 41ec5953..7f8817b8 100644 --- a/exercises/practice/hello-world/hello_world_test.sh +++ b/exercises/practice/hello-world/hello_world.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/house/.meta/config.json b/exercises/practice/house/.meta/config.json index 7e2031ed..04e0574c 100644 --- a/exercises/practice/house/.meta/config.json +++ b/exercises/practice/house/.meta/config.json @@ -14,7 +14,7 @@ "house.sh" ], "test": [ - "house_test.sh" + "house.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/house/house_test.sh b/exercises/practice/house/house.bats similarity index 99% rename from exercises/practice/house/house_test.sh rename to exercises/practice/house/house.bats index c618bf40..36d12e41 100644 --- a/exercises/practice/house/house_test.sh +++ b/exercises/practice/house/house.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.2.0.1 diff --git a/exercises/practice/isbn-verifier/.meta/config.json b/exercises/practice/isbn-verifier/.meta/config.json index 4b274247..e7617db5 100644 --- a/exercises/practice/isbn-verifier/.meta/config.json +++ b/exercises/practice/isbn-verifier/.meta/config.json @@ -14,7 +14,7 @@ "isbn_verifier.sh" ], "test": [ - "isbn_verifier_test.sh" + "isbn_verifier.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/isbn-verifier/isbn_verifier_test.sh b/exercises/practice/isbn-verifier/isbn_verifier.bats similarity index 99% rename from exercises/practice/isbn-verifier/isbn_verifier_test.sh rename to exercises/practice/isbn-verifier/isbn_verifier.bats index 5cd4fb13..9d6255f7 100644 --- a/exercises/practice/isbn-verifier/isbn_verifier_test.sh +++ b/exercises/practice/isbn-verifier/isbn_verifier.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.7.0.0 diff --git a/exercises/practice/isogram/.meta/config.json b/exercises/practice/isogram/.meta/config.json index 0a56cab9..31f436eb 100644 --- a/exercises/practice/isogram/.meta/config.json +++ b/exercises/practice/isogram/.meta/config.json @@ -15,7 +15,7 @@ "isogram.sh" ], "test": [ - "isogram_test.sh" + "isogram.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/isogram/isogram_test.sh b/exercises/practice/isogram/isogram.bats similarity index 99% rename from exercises/practice/isogram/isogram_test.sh rename to exercises/practice/isogram/isogram.bats index 65cb0cb9..a8630845 100644 --- a/exercises/practice/isogram/isogram_test.sh +++ b/exercises/practice/isogram/isogram.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.7.0.0 diff --git a/exercises/practice/kindergarten-garden/.meta/config.json b/exercises/practice/kindergarten-garden/.meta/config.json index 8cace03c..b32f439f 100644 --- a/exercises/practice/kindergarten-garden/.meta/config.json +++ b/exercises/practice/kindergarten-garden/.meta/config.json @@ -13,7 +13,7 @@ "kindergarten_garden.sh" ], "test": [ - "kindergarten_garden_test.sh" + "kindergarten_garden.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/kindergarten-garden/kindergarten_garden_test.sh b/exercises/practice/kindergarten-garden/kindergarten_garden.bats similarity index 99% rename from exercises/practice/kindergarten-garden/kindergarten_garden_test.sh rename to exercises/practice/kindergarten-garden/kindergarten_garden.bats index 715ccf81..63f362e1 100644 --- a/exercises/practice/kindergarten-garden/kindergarten_garden_test.sh +++ b/exercises/practice/kindergarten-garden/kindergarten_garden.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.1.0 diff --git a/exercises/practice/knapsack/.meta/config.json b/exercises/practice/knapsack/.meta/config.json index 669bc813..859b73d7 100644 --- a/exercises/practice/knapsack/.meta/config.json +++ b/exercises/practice/knapsack/.meta/config.json @@ -12,7 +12,7 @@ "knapsack.sh" ], "test": [ - "knapsack_test.sh" + "knapsack.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/knapsack/knapsack_test.sh b/exercises/practice/knapsack/knapsack.bats similarity index 98% rename from exercises/practice/knapsack/knapsack_test.sh rename to exercises/practice/knapsack/knapsack.bats index cbdbb3cb..f1a06f99 100644 --- a/exercises/practice/knapsack/knapsack_test.sh +++ b/exercises/practice/knapsack/knapsack.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.0.0.1 diff --git a/exercises/practice/largest-series-product/.meta/config.json b/exercises/practice/largest-series-product/.meta/config.json index 38a12293..ffe4d8a4 100644 --- a/exercises/practice/largest-series-product/.meta/config.json +++ b/exercises/practice/largest-series-product/.meta/config.json @@ -14,7 +14,7 @@ "largest_series_product.sh" ], "test": [ - "largest_series_product_test.sh" + "largest_series_product.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/largest-series-product/largest_series_product_test.sh b/exercises/practice/largest-series-product/largest_series_product.bats similarity index 99% rename from exercises/practice/largest-series-product/largest_series_product_test.sh rename to exercises/practice/largest-series-product/largest_series_product.bats index f9e483a8..a7577324 100644 --- a/exercises/practice/largest-series-product/largest_series_product_test.sh +++ b/exercises/practice/largest-series-product/largest_series_product.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json index d19098e2..0fe0e049 100644 --- a/exercises/practice/leap/.meta/config.json +++ b/exercises/practice/leap/.meta/config.json @@ -21,7 +21,7 @@ "leap.sh" ], "test": [ - "leap_test.sh" + "leap.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/leap/leap_test.sh b/exercises/practice/leap/leap.bats similarity index 99% rename from exercises/practice/leap/leap_test.sh rename to exercises/practice/leap/leap.bats index 031ba677..b6335589 100644 --- a/exercises/practice/leap/leap_test.sh +++ b/exercises/practice/leap/leap.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.6.0.1 diff --git a/exercises/practice/list-ops/.meta/config.json b/exercises/practice/list-ops/.meta/config.json index 76b793a7..07e0bae9 100644 --- a/exercises/practice/list-ops/.meta/config.json +++ b/exercises/practice/list-ops/.meta/config.json @@ -11,7 +11,7 @@ "list_ops.sh" ], "test": [ - "list_ops_test.sh" + "list_ops.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/list-ops/list_ops_test.sh b/exercises/practice/list-ops/list_ops.bats similarity index 99% rename from exercises/practice/list-ops/list_ops_test.sh rename to exercises/practice/list-ops/list_ops.bats index 33e4c0aa..3ea58a2d 100644 --- a/exercises/practice/list-ops/list_ops_test.sh +++ b/exercises/practice/list-ops/list_ops.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.4.0.0 diff --git a/exercises/practice/luhn/.meta/config.json b/exercises/practice/luhn/.meta/config.json index caa2d3e1..937b478d 100644 --- a/exercises/practice/luhn/.meta/config.json +++ b/exercises/practice/luhn/.meta/config.json @@ -17,7 +17,7 @@ "luhn.sh" ], "test": [ - "luhn_test.sh" + "luhn.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/luhn/luhn_test.sh b/exercises/practice/luhn/luhn.bats similarity index 99% rename from exercises/practice/luhn/luhn_test.sh rename to exercises/practice/luhn/luhn.bats index af613ff3..fdd3a214 100644 --- a/exercises/practice/luhn/luhn_test.sh +++ b/exercises/practice/luhn/luhn.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.7.0.0 diff --git a/exercises/practice/markdown/.meta/config.json b/exercises/practice/markdown/.meta/config.json index 765eb2ac..302bdd3d 100644 --- a/exercises/practice/markdown/.meta/config.json +++ b/exercises/practice/markdown/.meta/config.json @@ -12,7 +12,7 @@ "markdown.sh" ], "test": [ - "markdown_test.sh" + "markdown.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/markdown/markdown_test.sh b/exercises/practice/markdown/markdown.bats similarity index 99% rename from exercises/practice/markdown/markdown_test.sh rename to exercises/practice/markdown/markdown.bats index 0296939c..5c2a5de6 100644 --- a/exercises/practice/markdown/markdown_test.sh +++ b/exercises/practice/markdown/markdown.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.4.0.0 diff --git a/exercises/practice/matching-brackets/.meta/config.json b/exercises/practice/matching-brackets/.meta/config.json index b91508f3..fc489f6d 100644 --- a/exercises/practice/matching-brackets/.meta/config.json +++ b/exercises/practice/matching-brackets/.meta/config.json @@ -14,7 +14,7 @@ "matching_brackets.sh" ], "test": [ - "matching_brackets_test.sh" + "matching_brackets.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/matching-brackets/matching_brackets_test.sh b/exercises/practice/matching-brackets/matching_brackets.bats similarity index 99% rename from exercises/practice/matching-brackets/matching_brackets_test.sh rename to exercises/practice/matching-brackets/matching_brackets.bats index e3feb220..630d6601 100644 --- a/exercises/practice/matching-brackets/matching_brackets_test.sh +++ b/exercises/practice/matching-brackets/matching_brackets.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.0 diff --git a/exercises/practice/meetup/.meta/config.json b/exercises/practice/meetup/.meta/config.json index 8a7b07f1..3c846c78 100644 --- a/exercises/practice/meetup/.meta/config.json +++ b/exercises/practice/meetup/.meta/config.json @@ -12,7 +12,7 @@ "meetup.sh" ], "test": [ - "meetup_test.sh" + "meetup.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/meetup/meetup_test.sh b/exercises/practice/meetup/meetup.bats similarity index 99% rename from exercises/practice/meetup/meetup_test.sh rename to exercises/practice/meetup/meetup.bats index bbd6314a..2f519655 100644 --- a/exercises/practice/meetup/meetup_test.sh +++ b/exercises/practice/meetup/meetup.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/nth-prime/.meta/config.json b/exercises/practice/nth-prime/.meta/config.json index 67bfe75e..3e393028 100644 --- a/exercises/practice/nth-prime/.meta/config.json +++ b/exercises/practice/nth-prime/.meta/config.json @@ -12,7 +12,7 @@ "nth_prime.sh" ], "test": [ - "nth_prime_test.sh" + "nth_prime.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/nth-prime/nth_prime_test.sh b/exercises/practice/nth-prime/nth_prime.bats similarity index 98% rename from exercises/practice/nth-prime/nth_prime_test.sh rename to exercises/practice/nth-prime/nth_prime.bats index fafb3717..d0a90e32 100644 --- a/exercises/practice/nth-prime/nth_prime_test.sh +++ b/exercises/practice/nth-prime/nth_prime.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.1.0.0 diff --git a/exercises/practice/nucleotide-count/.meta/config.json b/exercises/practice/nucleotide-count/.meta/config.json index 1797b84a..701de84c 100644 --- a/exercises/practice/nucleotide-count/.meta/config.json +++ b/exercises/practice/nucleotide-count/.meta/config.json @@ -18,7 +18,7 @@ "nucleotide_count.sh" ], "test": [ - "nucleotide_count_test.sh" + "nucleotide_count.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/nucleotide-count/nucleotide_count_test.sh b/exercises/practice/nucleotide-count/nucleotide_count.bats similarity index 98% rename from exercises/practice/nucleotide-count/nucleotide_count_test.sh rename to exercises/practice/nucleotide-count/nucleotide_count.bats index 1a8972cd..5b9a4a2e 100644 --- a/exercises/practice/nucleotide-count/nucleotide_count_test.sh +++ b/exercises/practice/nucleotide-count/nucleotide_count.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.3.0.0 diff --git a/exercises/practice/ocr-numbers/.meta/config.json b/exercises/practice/ocr-numbers/.meta/config.json index 06ce6ed0..0143f803 100644 --- a/exercises/practice/ocr-numbers/.meta/config.json +++ b/exercises/practice/ocr-numbers/.meta/config.json @@ -12,7 +12,7 @@ "ocr_numbers.sh" ], "test": [ - "ocr_numbers_test.sh" + "ocr_numbers.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/ocr-numbers/ocr_numbers_test.sh b/exercises/practice/ocr-numbers/ocr_numbers.bats similarity index 99% rename from exercises/practice/ocr-numbers/ocr_numbers_test.sh rename to exercises/practice/ocr-numbers/ocr_numbers.bats index c19a22b7..0b9a6230 100644 --- a/exercises/practice/ocr-numbers/ocr_numbers_test.sh +++ b/exercises/practice/ocr-numbers/ocr_numbers.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/palindrome-products/.meta/config.json b/exercises/practice/palindrome-products/.meta/config.json index d4b6d15c..94389d12 100644 --- a/exercises/practice/palindrome-products/.meta/config.json +++ b/exercises/practice/palindrome-products/.meta/config.json @@ -13,7 +13,7 @@ "palindrome_products.sh" ], "test": [ - "palindrome_products_test.sh" + "palindrome_products.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/palindrome-products/palindrome_products_test.sh b/exercises/practice/palindrome-products/palindrome_products.bats similarity index 99% rename from exercises/practice/palindrome-products/palindrome_products_test.sh rename to exercises/practice/palindrome-products/palindrome_products.bats index 33f5982f..074500fa 100644 --- a/exercises/practice/palindrome-products/palindrome_products_test.sh +++ b/exercises/practice/palindrome-products/palindrome_products.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.1 diff --git a/exercises/practice/pangram/.meta/config.json b/exercises/practice/pangram/.meta/config.json index ae72e907..268f605f 100644 --- a/exercises/practice/pangram/.meta/config.json +++ b/exercises/practice/pangram/.meta/config.json @@ -19,7 +19,7 @@ "pangram.sh" ], "test": [ - "pangram_test.sh" + "pangram.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/pangram/pangram_test.sh b/exercises/practice/pangram/pangram.bats similarity index 98% rename from exercises/practice/pangram/pangram_test.sh rename to exercises/practice/pangram/pangram.bats index 2a58541f..45d01c55 100644 --- a/exercises/practice/pangram/pangram_test.sh +++ b/exercises/practice/pangram/pangram.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.0 diff --git a/exercises/practice/pascals-triangle/.meta/config.json b/exercises/practice/pascals-triangle/.meta/config.json index 81740e04..a5440df5 100644 --- a/exercises/practice/pascals-triangle/.meta/config.json +++ b/exercises/practice/pascals-triangle/.meta/config.json @@ -13,7 +13,7 @@ "pascals_triangle.sh" ], "test": [ - "pascals_triangle_test.sh" + "pascals_triangle.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/pascals-triangle/pascals_triangle_test.sh b/exercises/practice/pascals-triangle/pascals_triangle.bats similarity index 99% rename from exercises/practice/pascals-triangle/pascals_triangle_test.sh rename to exercises/practice/pascals-triangle/pascals_triangle.bats index 04d42665..d1c6ac78 100644 --- a/exercises/practice/pascals-triangle/pascals_triangle_test.sh +++ b/exercises/practice/pascals-triangle/pascals_triangle.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.5.0.0 diff --git a/exercises/practice/perfect-numbers/.meta/config.json b/exercises/practice/perfect-numbers/.meta/config.json index 31607d9c..8723db6f 100644 --- a/exercises/practice/perfect-numbers/.meta/config.json +++ b/exercises/practice/perfect-numbers/.meta/config.json @@ -14,7 +14,7 @@ "perfect_numbers.sh" ], "test": [ - "perfect_numbers_test.sh" + "perfect_numbers.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/perfect-numbers/perfect_numbers_test.sh b/exercises/practice/perfect-numbers/perfect_numbers.bats similarity index 99% rename from exercises/practice/perfect-numbers/perfect_numbers_test.sh rename to exercises/practice/perfect-numbers/perfect_numbers.bats index 55c87c33..6af4ee9c 100644 --- a/exercises/practice/perfect-numbers/perfect_numbers_test.sh +++ b/exercises/practice/perfect-numbers/perfect_numbers.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/phone-number/.meta/config.json b/exercises/practice/phone-number/.meta/config.json index eee81245..a9532dc5 100644 --- a/exercises/practice/phone-number/.meta/config.json +++ b/exercises/practice/phone-number/.meta/config.json @@ -20,7 +20,7 @@ "phone_number.sh" ], "test": [ - "phone_number_test.sh" + "phone_number.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/phone-number/phone_number_test.sh b/exercises/practice/phone-number/phone_number.bats similarity index 99% rename from exercises/practice/phone-number/phone_number_test.sh rename to exercises/practice/phone-number/phone_number.bats index 2379e2e3..2d77458f 100644 --- a/exercises/practice/phone-number/phone_number_test.sh +++ b/exercises/practice/phone-number/phone_number.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.7.0.0 diff --git a/exercises/practice/pig-latin/.meta/config.json b/exercises/practice/pig-latin/.meta/config.json index 5123d1bc..41cf14d4 100644 --- a/exercises/practice/pig-latin/.meta/config.json +++ b/exercises/practice/pig-latin/.meta/config.json @@ -14,7 +14,7 @@ "pig_latin.sh" ], "test": [ - "pig_latin_test.sh" + "pig_latin.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/pig-latin/pig_latin_test.sh b/exercises/practice/pig-latin/pig_latin.bats similarity index 99% rename from exercises/practice/pig-latin/pig_latin_test.sh rename to exercises/practice/pig-latin/pig_latin.bats index e2cd322e..11edb9ac 100644 --- a/exercises/practice/pig-latin/pig_latin_test.sh +++ b/exercises/practice/pig-latin/pig_latin.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.1 diff --git a/exercises/practice/poker/.meta/config.json b/exercises/practice/poker/.meta/config.json index 96121ff9..999d1104 100644 --- a/exercises/practice/poker/.meta/config.json +++ b/exercises/practice/poker/.meta/config.json @@ -12,7 +12,7 @@ "poker.sh" ], "test": [ - "poker_test.sh" + "poker.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/poker/poker_test.sh b/exercises/practice/poker/poker.bats similarity index 99% rename from exercises/practice/poker/poker_test.sh rename to exercises/practice/poker/poker.bats index 2d74a628..16200dc6 100644 --- a/exercises/practice/poker/poker_test.sh +++ b/exercises/practice/poker/poker.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/prime-factors/.meta/config.json b/exercises/practice/prime-factors/.meta/config.json index 55d78306..f1c16b5f 100644 --- a/exercises/practice/prime-factors/.meta/config.json +++ b/exercises/practice/prime-factors/.meta/config.json @@ -14,7 +14,7 @@ "prime_factors.sh" ], "test": [ - "prime_factors_test.sh" + "prime_factors.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/prime-factors/prime_factors_test.sh b/exercises/practice/prime-factors/prime_factors.bats similarity index 99% rename from exercises/practice/prime-factors/prime_factors_test.sh rename to exercises/practice/prime-factors/prime_factors.bats index 409adc26..f51d46d2 100644 --- a/exercises/practice/prime-factors/prime_factors_test.sh +++ b/exercises/practice/prime-factors/prime_factors.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/protein-translation/.meta/config.json b/exercises/practice/protein-translation/.meta/config.json index 054fa1bd..7626bfc2 100644 --- a/exercises/practice/protein-translation/.meta/config.json +++ b/exercises/practice/protein-translation/.meta/config.json @@ -14,7 +14,7 @@ "protein_translation.sh" ], "test": [ - "protein_translation_test.sh" + "protein_translation.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/protein-translation/protein_translation_test.sh b/exercises/practice/protein-translation/protein_translation.bats similarity index 99% rename from exercises/practice/protein-translation/protein_translation_test.sh rename to exercises/practice/protein-translation/protein_translation.bats index 11138bed..e437bf00 100644 --- a/exercises/practice/protein-translation/protein_translation_test.sh +++ b/exercises/practice/protein-translation/protein_translation.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.1.0 diff --git a/exercises/practice/proverb/.meta/config.json b/exercises/practice/proverb/.meta/config.json index f7ad76e4..2d0b1241 100644 --- a/exercises/practice/proverb/.meta/config.json +++ b/exercises/practice/proverb/.meta/config.json @@ -14,7 +14,7 @@ "proverb.sh" ], "test": [ - "proverb_test.sh" + "proverb.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/proverb/proverb_test.sh b/exercises/practice/proverb/proverb.bats similarity index 99% rename from exercises/practice/proverb/proverb_test.sh rename to exercises/practice/proverb/proverb.bats index adae36d3..f96d5098 100644 --- a/exercises/practice/proverb/proverb_test.sh +++ b/exercises/practice/proverb/proverb.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.1 diff --git a/exercises/practice/pythagorean-triplet/.meta/config.json b/exercises/practice/pythagorean-triplet/.meta/config.json index cd0b7eea..23ac6d0e 100644 --- a/exercises/practice/pythagorean-triplet/.meta/config.json +++ b/exercises/practice/pythagorean-triplet/.meta/config.json @@ -12,7 +12,7 @@ "pythagorean_triplet.sh" ], "test": [ - "pythagorean_triplet_test.sh" + "pythagorean_triplet.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/pythagorean-triplet/pythagorean_triplet_test.sh b/exercises/practice/pythagorean-triplet/pythagorean_triplet.bats similarity index 99% rename from exercises/practice/pythagorean-triplet/pythagorean_triplet_test.sh rename to exercises/practice/pythagorean-triplet/pythagorean_triplet.bats index 4a9f711b..3a53c7c8 100644 --- a/exercises/practice/pythagorean-triplet/pythagorean_triplet_test.sh +++ b/exercises/practice/pythagorean-triplet/pythagorean_triplet.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.0.0.0 diff --git a/exercises/practice/queen-attack/.meta/config.json b/exercises/practice/queen-attack/.meta/config.json index 65584525..8bacd14f 100644 --- a/exercises/practice/queen-attack/.meta/config.json +++ b/exercises/practice/queen-attack/.meta/config.json @@ -12,7 +12,7 @@ "queen_attack.sh" ], "test": [ - "queen_attack_test.sh" + "queen_attack.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/queen-attack/queen_attack_test.sh b/exercises/practice/queen-attack/queen_attack.bats similarity index 99% rename from exercises/practice/queen-attack/queen_attack_test.sh rename to exercises/practice/queen-attack/queen_attack.bats index d1b80adb..54f907be 100644 --- a/exercises/practice/queen-attack/queen_attack_test.sh +++ b/exercises/practice/queen-attack/queen_attack.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.3.0.0 diff --git a/exercises/practice/rail-fence-cipher/.meta/config.json b/exercises/practice/rail-fence-cipher/.meta/config.json index 4886ef62..7b0cf365 100644 --- a/exercises/practice/rail-fence-cipher/.meta/config.json +++ b/exercises/practice/rail-fence-cipher/.meta/config.json @@ -12,7 +12,7 @@ "rail_fence_cipher.sh" ], "test": [ - "rail_fence_cipher_test.sh" + "rail_fence_cipher.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/rail-fence-cipher/rail_fence_cipher_test.sh b/exercises/practice/rail-fence-cipher/rail_fence_cipher.bats similarity index 99% rename from exercises/practice/rail-fence-cipher/rail_fence_cipher_test.sh rename to exercises/practice/rail-fence-cipher/rail_fence_cipher.bats index 7934b111..87fc3b4c 100644 --- a/exercises/practice/rail-fence-cipher/rail_fence_cipher_test.sh +++ b/exercises/practice/rail-fence-cipher/rail_fence_cipher.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.1 diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json index 536a2f21..11400204 100644 --- a/exercises/practice/raindrops/.meta/config.json +++ b/exercises/practice/raindrops/.meta/config.json @@ -21,7 +21,7 @@ "raindrops.sh" ], "test": [ - "raindrops_test.sh" + "raindrops.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/raindrops/raindrops_test.sh b/exercises/practice/raindrops/raindrops.bats similarity index 99% rename from exercises/practice/raindrops/raindrops_test.sh rename to exercises/practice/raindrops/raindrops.bats index 188b0a9e..4d29546f 100644 --- a/exercises/practice/raindrops/raindrops_test.sh +++ b/exercises/practice/raindrops/raindrops.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/rational-numbers/.meta/config.json b/exercises/practice/rational-numbers/.meta/config.json index 59f3e877..11cf2736 100644 --- a/exercises/practice/rational-numbers/.meta/config.json +++ b/exercises/practice/rational-numbers/.meta/config.json @@ -14,7 +14,7 @@ "rational_numbers.sh" ], "test": [ - "rational_numbers_test.sh" + "rational_numbers.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/rational-numbers/rational_numbers_test.sh b/exercises/practice/rational-numbers/rational_numbers.bats similarity index 99% rename from exercises/practice/rational-numbers/rational_numbers_test.sh rename to exercises/practice/rational-numbers/rational_numbers.bats index 8f45c2de..d9bbe880 100644 --- a/exercises/practice/rational-numbers/rational_numbers_test.sh +++ b/exercises/practice/rational-numbers/rational_numbers.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/rectangles/.meta/config.json b/exercises/practice/rectangles/.meta/config.json index 0686f7de..b947f39c 100644 --- a/exercises/practice/rectangles/.meta/config.json +++ b/exercises/practice/rectangles/.meta/config.json @@ -12,7 +12,7 @@ "rectangles.sh" ], "test": [ - "rectangles_test.sh" + "rectangles.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/rectangles/rectangles_test.sh b/exercises/practice/rectangles/rectangles.bats similarity index 99% rename from exercises/practice/rectangles/rectangles_test.sh rename to exercises/practice/rectangles/rectangles.bats index 1867fed5..be091ead 100644 --- a/exercises/practice/rectangles/rectangles_test.sh +++ b/exercises/practice/rectangles/rectangles.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/resistor-color-duo/.meta/config.json b/exercises/practice/resistor-color-duo/.meta/config.json index 1c676049..8e828d35 100644 --- a/exercises/practice/resistor-color-duo/.meta/config.json +++ b/exercises/practice/resistor-color-duo/.meta/config.json @@ -14,7 +14,7 @@ "resistor_color_duo.sh" ], "test": [ - "resistor_color_duo_test.sh" + "resistor_color_duo.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/resistor-color-duo/resistor_color_duo_test.sh b/exercises/practice/resistor-color-duo/resistor_color_duo.bats similarity index 98% rename from exercises/practice/resistor-color-duo/resistor_color_duo_test.sh rename to exercises/practice/resistor-color-duo/resistor_color_duo.bats index 3b0416b0..7f0fd769 100644 --- a/exercises/practice/resistor-color-duo/resistor_color_duo_test.sh +++ b/exercises/practice/resistor-color-duo/resistor_color_duo.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.1.0.1 diff --git a/exercises/practice/resistor-color-trio/.meta/config.json b/exercises/practice/resistor-color-trio/.meta/config.json index ec6e9a41..3f68b87a 100644 --- a/exercises/practice/resistor-color-trio/.meta/config.json +++ b/exercises/practice/resistor-color-trio/.meta/config.json @@ -13,7 +13,7 @@ "resistor_color_trio.sh" ], "test": [ - "resistor_color_trio_test.sh" + "resistor_color_trio.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/resistor-color-trio/resistor_color_trio_test.sh b/exercises/practice/resistor-color-trio/resistor_color_trio.bats similarity index 99% rename from exercises/practice/resistor-color-trio/resistor_color_trio_test.sh rename to exercises/practice/resistor-color-trio/resistor_color_trio.bats index ae109339..9e68a902 100644 --- a/exercises/practice/resistor-color-trio/resistor_color_trio_test.sh +++ b/exercises/practice/resistor-color-trio/resistor_color_trio.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.0.0.2 diff --git a/exercises/practice/reverse-string/.meta/config.json b/exercises/practice/reverse-string/.meta/config.json index 91321993..3d6893f8 100644 --- a/exercises/practice/reverse-string/.meta/config.json +++ b/exercises/practice/reverse-string/.meta/config.json @@ -17,7 +17,7 @@ "reverse_string.sh" ], "test": [ - "reverse_string_test.sh" + "reverse_string.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/reverse-string/reverse_string_test.sh b/exercises/practice/reverse-string/reverse_string.bats similarity index 98% rename from exercises/practice/reverse-string/reverse_string_test.sh rename to exercises/practice/reverse-string/reverse_string.bats index 7b5e285c..fa88436f 100644 --- a/exercises/practice/reverse-string/reverse_string_test.sh +++ b/exercises/practice/reverse-string/reverse_string.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.1 diff --git a/exercises/practice/rna-transcription/.meta/config.json b/exercises/practice/rna-transcription/.meta/config.json index 22da1830..7db8181f 100644 --- a/exercises/practice/rna-transcription/.meta/config.json +++ b/exercises/practice/rna-transcription/.meta/config.json @@ -21,7 +21,7 @@ "rna_transcription.sh" ], "test": [ - "rna_transcription_test.sh" + "rna_transcription.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/rna-transcription/rna_transcription_test.sh b/exercises/practice/rna-transcription/rna_transcription.bats similarity index 98% rename from exercises/practice/rna-transcription/rna_transcription_test.sh rename to exercises/practice/rna-transcription/rna_transcription.bats index afbc323b..98246e56 100644 --- a/exercises/practice/rna-transcription/rna_transcription_test.sh +++ b/exercises/practice/rna-transcription/rna_transcription.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.3.0.0 diff --git a/exercises/practice/robot-simulator/.meta/config.json b/exercises/practice/robot-simulator/.meta/config.json index c6ed1bc1..e3904c79 100644 --- a/exercises/practice/robot-simulator/.meta/config.json +++ b/exercises/practice/robot-simulator/.meta/config.json @@ -12,7 +12,7 @@ "robot_simulator.sh" ], "test": [ - "robot_simulator_test.sh" + "robot_simulator.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/robot-simulator/robot_simulator_test.sh b/exercises/practice/robot-simulator/robot_simulator.bats similarity index 99% rename from exercises/practice/robot-simulator/robot_simulator_test.sh rename to exercises/practice/robot-simulator/robot_simulator.bats index e5773f39..6b34b922 100644 --- a/exercises/practice/robot-simulator/robot_simulator_test.sh +++ b/exercises/practice/robot-simulator/robot_simulator.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 3.2.0.1 diff --git a/exercises/practice/roman-numerals/.meta/config.json b/exercises/practice/roman-numerals/.meta/config.json index 7ab508dd..9dfc68d5 100644 --- a/exercises/practice/roman-numerals/.meta/config.json +++ b/exercises/practice/roman-numerals/.meta/config.json @@ -17,7 +17,7 @@ "roman_numerals.sh" ], "test": [ - "roman_numerals_test.sh" + "roman_numerals.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/roman-numerals/roman_numerals_test.sh b/exercises/practice/roman-numerals/roman_numerals.bats similarity index 99% rename from exercises/practice/roman-numerals/roman_numerals_test.sh rename to exercises/practice/roman-numerals/roman_numerals.bats index ff017871..f35738e2 100644 --- a/exercises/practice/roman-numerals/roman_numerals_test.sh +++ b/exercises/practice/roman-numerals/roman_numerals.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/rotational-cipher/.meta/config.json b/exercises/practice/rotational-cipher/.meta/config.json index 6e037d99..621b1e93 100644 --- a/exercises/practice/rotational-cipher/.meta/config.json +++ b/exercises/practice/rotational-cipher/.meta/config.json @@ -14,7 +14,7 @@ "rotational_cipher.sh" ], "test": [ - "rotational_cipher_test.sh" + "rotational_cipher.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/rotational-cipher/rotational_cipher_test.sh b/exercises/practice/rotational-cipher/rotational_cipher.bats similarity index 99% rename from exercises/practice/rotational-cipher/rotational_cipher_test.sh rename to exercises/practice/rotational-cipher/rotational_cipher.bats index bb5d004a..7557769d 100644 --- a/exercises/practice/rotational-cipher/rotational_cipher_test.sh +++ b/exercises/practice/rotational-cipher/rotational_cipher.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/run-length-encoding/.meta/config.json b/exercises/practice/run-length-encoding/.meta/config.json index a65ec833..4c6ca7f7 100644 --- a/exercises/practice/run-length-encoding/.meta/config.json +++ b/exercises/practice/run-length-encoding/.meta/config.json @@ -14,7 +14,7 @@ "run_length_encoding.sh" ], "test": [ - "run_length_encoding_test.sh" + "run_length_encoding.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/run-length-encoding/run_length_encoding_test.sh b/exercises/practice/run-length-encoding/run_length_encoding.bats similarity index 99% rename from exercises/practice/run-length-encoding/run_length_encoding_test.sh rename to exercises/practice/run-length-encoding/run_length_encoding.bats index 1138514f..af7cda53 100644 --- a/exercises/practice/run-length-encoding/run_length_encoding_test.sh +++ b/exercises/practice/run-length-encoding/run_length_encoding.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/satellite/.meta/config.json b/exercises/practice/satellite/.meta/config.json index 70470301..170fdc1c 100644 --- a/exercises/practice/satellite/.meta/config.json +++ b/exercises/practice/satellite/.meta/config.json @@ -11,7 +11,7 @@ "satellite.sh" ], "test": [ - "satellite_test.sh" + "satellite.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/satellite/satellite_test.sh b/exercises/practice/satellite/satellite.bats similarity index 100% rename from exercises/practice/satellite/satellite_test.sh rename to exercises/practice/satellite/satellite.bats diff --git a/exercises/practice/say/.meta/config.json b/exercises/practice/say/.meta/config.json index ac9ae391..b2f57429 100644 --- a/exercises/practice/say/.meta/config.json +++ b/exercises/practice/say/.meta/config.json @@ -14,7 +14,7 @@ "say.sh" ], "test": [ - "say_test.sh" + "say.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/say/say_test.sh b/exercises/practice/say/say.bats similarity index 99% rename from exercises/practice/say/say_test.sh rename to exercises/practice/say/say.bats index 18ca5393..3d9cdbfd 100644 --- a/exercises/practice/say/say_test.sh +++ b/exercises/practice/say/say.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/scrabble-score/.meta/config.json b/exercises/practice/scrabble-score/.meta/config.json index d0ddc177..08d7d4fd 100644 --- a/exercises/practice/scrabble-score/.meta/config.json +++ b/exercises/practice/scrabble-score/.meta/config.json @@ -17,7 +17,7 @@ "scrabble_score.sh" ], "test": [ - "scrabble_score_test.sh" + "scrabble_score.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/scrabble-score/scrabble_score_test.sh b/exercises/practice/scrabble-score/scrabble_score.bats similarity index 98% rename from exercises/practice/scrabble-score/scrabble_score_test.sh rename to exercises/practice/scrabble-score/scrabble_score.bats index f25b04b2..f3a7558e 100644 --- a/exercises/practice/scrabble-score/scrabble_score_test.sh +++ b/exercises/practice/scrabble-score/scrabble_score.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/secret-handshake/.meta/config.json b/exercises/practice/secret-handshake/.meta/config.json index 5c3aa2df..57ac7b5a 100644 --- a/exercises/practice/secret-handshake/.meta/config.json +++ b/exercises/practice/secret-handshake/.meta/config.json @@ -14,7 +14,7 @@ "secret_handshake.sh" ], "test": [ - "secret_handshake_test.sh" + "secret_handshake.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/secret-handshake/secret_handshake_test.sh b/exercises/practice/secret-handshake/secret_handshake.bats similarity index 98% rename from exercises/practice/secret-handshake/secret_handshake_test.sh rename to exercises/practice/secret-handshake/secret_handshake.bats index f34a8ded..2f944b23 100644 --- a/exercises/practice/secret-handshake/secret_handshake_test.sh +++ b/exercises/practice/secret-handshake/secret_handshake.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/series/.meta/config.json b/exercises/practice/series/.meta/config.json index 2a693b18..f7181d1c 100644 --- a/exercises/practice/series/.meta/config.json +++ b/exercises/practice/series/.meta/config.json @@ -14,7 +14,7 @@ "series.sh" ], "test": [ - "series_test.sh" + "series.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/series/series_test.sh b/exercises/practice/series/series.bats similarity index 99% rename from exercises/practice/series/series_test.sh rename to exercises/practice/series/series.bats index ce1b3ce6..4fa1bd6f 100644 --- a/exercises/practice/series/series_test.sh +++ b/exercises/practice/series/series.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.0.0.0 diff --git a/exercises/practice/sieve/.meta/config.json b/exercises/practice/sieve/.meta/config.json index 16da77bf..675becf9 100644 --- a/exercises/practice/sieve/.meta/config.json +++ b/exercises/practice/sieve/.meta/config.json @@ -14,7 +14,7 @@ "sieve.sh" ], "test": [ - "sieve_test.sh" + "sieve.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/sieve/sieve_test.sh b/exercises/practice/sieve/sieve.bats similarity index 98% rename from exercises/practice/sieve/sieve_test.sh rename to exercises/practice/sieve/sieve.bats index 60bc910d..b536abf9 100644 --- a/exercises/practice/sieve/sieve_test.sh +++ b/exercises/practice/sieve/sieve.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/simple-cipher/.meta/config.json b/exercises/practice/simple-cipher/.meta/config.json index 2bf37b02..7970800f 100644 --- a/exercises/practice/simple-cipher/.meta/config.json +++ b/exercises/practice/simple-cipher/.meta/config.json @@ -12,7 +12,7 @@ "simple_cipher.sh" ], "test": [ - "simple_cipher_test.sh" + "simple_cipher.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/simple-cipher/simple_cipher_test.sh b/exercises/practice/simple-cipher/simple_cipher.bats similarity index 99% rename from exercises/practice/simple-cipher/simple_cipher_test.sh rename to exercises/practice/simple-cipher/simple_cipher.bats index 55f1e4ad..8e11e418 100644 --- a/exercises/practice/simple-cipher/simple_cipher_test.sh +++ b/exercises/practice/simple-cipher/simple_cipher.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 2.0.0.1 diff --git a/exercises/practice/space-age/.meta/config.json b/exercises/practice/space-age/.meta/config.json index 6020fc22..6d72d70e 100644 --- a/exercises/practice/space-age/.meta/config.json +++ b/exercises/practice/space-age/.meta/config.json @@ -14,7 +14,7 @@ "space_age.sh" ], "test": [ - "space_age_test.sh" + "space_age.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/space-age/space_age_test.sh b/exercises/practice/space-age/space_age.bats similarity index 98% rename from exercises/practice/space-age/space_age_test.sh rename to exercises/practice/space-age/space_age.bats index 44c7dbd1..528699e0 100644 --- a/exercises/practice/space-age/space_age_test.sh +++ b/exercises/practice/space-age/space_age.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/spiral-matrix/.meta/config.json b/exercises/practice/spiral-matrix/.meta/config.json index 15b2f04a..b02e534f 100644 --- a/exercises/practice/spiral-matrix/.meta/config.json +++ b/exercises/practice/spiral-matrix/.meta/config.json @@ -12,7 +12,7 @@ "spiral_matrix.sh" ], "test": [ - "spiral_matrix_test.sh" + "spiral_matrix.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/spiral-matrix/spiral_matrix_test.sh b/exercises/practice/spiral-matrix/spiral_matrix.bats similarity index 98% rename from exercises/practice/spiral-matrix/spiral_matrix_test.sh rename to exercises/practice/spiral-matrix/spiral_matrix.bats index cd922b32..fa935952 100644 --- a/exercises/practice/spiral-matrix/spiral_matrix_test.sh +++ b/exercises/practice/spiral-matrix/spiral_matrix.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/square-root/.meta/config.json b/exercises/practice/square-root/.meta/config.json index 6e9078c2..9fd7c261 100644 --- a/exercises/practice/square-root/.meta/config.json +++ b/exercises/practice/square-root/.meta/config.json @@ -8,7 +8,7 @@ "square_root.sh" ], "test": [ - "square_root_test.sh" + "square_root.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/square-root/square_root_test.sh b/exercises/practice/square-root/square_root.bats similarity index 97% rename from exercises/practice/square-root/square_root_test.sh rename to exercises/practice/square-root/square_root.bats index 6c148199..15af0ba9 100644 --- a/exercises/practice/square-root/square_root_test.sh +++ b/exercises/practice/square-root/square_root.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra @test "root of 1" { diff --git a/exercises/practice/sublist/.meta/config.json b/exercises/practice/sublist/.meta/config.json index b3a5739c..548e0fb1 100644 --- a/exercises/practice/sublist/.meta/config.json +++ b/exercises/practice/sublist/.meta/config.json @@ -12,7 +12,7 @@ "sublist.sh" ], "test": [ - "sublist_test.sh" + "sublist.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/sublist/sublist_test.sh b/exercises/practice/sublist/sublist.bats similarity index 99% rename from exercises/practice/sublist/sublist_test.sh rename to exercises/practice/sublist/sublist.bats index ea40cd0e..1925c5a6 100644 --- a/exercises/practice/sublist/sublist_test.sh +++ b/exercises/practice/sublist/sublist.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/sum-of-multiples/.meta/config.json b/exercises/practice/sum-of-multiples/.meta/config.json index d8baf7b2..be205b36 100644 --- a/exercises/practice/sum-of-multiples/.meta/config.json +++ b/exercises/practice/sum-of-multiples/.meta/config.json @@ -13,7 +13,7 @@ "sum_of_multiples.sh" ], "test": [ - "sum_of_multiples_test.sh" + "sum_of_multiples.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/sum-of-multiples/sum_of_multiples_test.sh b/exercises/practice/sum-of-multiples/sum_of_multiples.bats similarity index 99% rename from exercises/practice/sum-of-multiples/sum_of_multiples_test.sh rename to exercises/practice/sum-of-multiples/sum_of_multiples.bats index a809495c..bd9c465d 100644 --- a/exercises/practice/sum-of-multiples/sum_of_multiples_test.sh +++ b/exercises/practice/sum-of-multiples/sum_of_multiples.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.5.0.0 diff --git a/exercises/practice/tournament/.meta/config.json b/exercises/practice/tournament/.meta/config.json index d0f733d0..5f00cab8 100644 --- a/exercises/practice/tournament/.meta/config.json +++ b/exercises/practice/tournament/.meta/config.json @@ -12,7 +12,7 @@ "tournament.sh" ], "test": [ - "tournament_test.sh" + "tournament.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/tournament/tournament_test.sh b/exercises/practice/tournament/tournament.bats similarity index 99% rename from exercises/practice/tournament/tournament_test.sh rename to exercises/practice/tournament/tournament.bats index 93411841..d0262566 100644 --- a/exercises/practice/tournament/tournament_test.sh +++ b/exercises/practice/tournament/tournament.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.4.0.0 diff --git a/exercises/practice/transpose/.meta/config.json b/exercises/practice/transpose/.meta/config.json index 3ab1fd8f..fccc4e5c 100644 --- a/exercises/practice/transpose/.meta/config.json +++ b/exercises/practice/transpose/.meta/config.json @@ -12,7 +12,7 @@ "transpose.sh" ], "test": [ - "transpose_test.sh" + "transpose.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/transpose/transpose_test.sh b/exercises/practice/transpose/transpose.bats similarity index 99% rename from exercises/practice/transpose/transpose_test.sh rename to exercises/practice/transpose/transpose.bats index 744da279..ff0d4902 100644 --- a/exercises/practice/transpose/transpose_test.sh +++ b/exercises/practice/transpose/transpose.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.1.0.0 diff --git a/exercises/practice/triangle/.meta/config.json b/exercises/practice/triangle/.meta/config.json index 32f94342..40c7f5ec 100644 --- a/exercises/practice/triangle/.meta/config.json +++ b/exercises/practice/triangle/.meta/config.json @@ -20,7 +20,7 @@ "triangle.sh" ], "test": [ - "triangle_test.sh" + "triangle.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/triangle/triangle_test.sh b/exercises/practice/triangle/triangle.bats similarity index 99% rename from exercises/practice/triangle/triangle_test.sh rename to exercises/practice/triangle/triangle.bats index b2a7b945..164b3183 100644 --- a/exercises/practice/triangle/triangle_test.sh +++ b/exercises/practice/triangle/triangle.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.1.0 diff --git a/exercises/practice/twelve-days/.meta/config.json b/exercises/practice/twelve-days/.meta/config.json index 67925a9c..e644f6be 100644 --- a/exercises/practice/twelve-days/.meta/config.json +++ b/exercises/practice/twelve-days/.meta/config.json @@ -14,7 +14,7 @@ "twelve_days.sh" ], "test": [ - "twelve_days_test.sh" + "twelve_days.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/twelve-days/twelve_days_test.sh b/exercises/practice/twelve-days/twelve_days.bats similarity index 99% rename from exercises/practice/twelve-days/twelve_days_test.sh rename to exercises/practice/twelve-days/twelve_days.bats index bded034a..a45b7382 100644 --- a/exercises/practice/twelve-days/twelve_days_test.sh +++ b/exercises/practice/twelve-days/twelve_days.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/two-bucket/.meta/config.json b/exercises/practice/two-bucket/.meta/config.json index fc1d7910..74258725 100644 --- a/exercises/practice/two-bucket/.meta/config.json +++ b/exercises/practice/two-bucket/.meta/config.json @@ -14,7 +14,7 @@ "two_bucket.sh" ], "test": [ - "two_bucket_test.sh" + "two_bucket.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/two-bucket/two_bucket_test.sh b/exercises/practice/two-bucket/two_bucket.bats similarity index 99% rename from exercises/practice/two-bucket/two_bucket_test.sh rename to exercises/practice/two-bucket/two_bucket.bats index 58085cba..bc6c29f8 100644 --- a/exercises/practice/two-bucket/two_bucket_test.sh +++ b/exercises/practice/two-bucket/two_bucket.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.4.0.1 diff --git a/exercises/practice/two-fer/.meta/config.json b/exercises/practice/two-fer/.meta/config.json index 4c033b2c..62af6d04 100644 --- a/exercises/practice/two-fer/.meta/config.json +++ b/exercises/practice/two-fer/.meta/config.json @@ -20,7 +20,7 @@ "two_fer.sh" ], "test": [ - "two_fer_test.sh" + "two_fer.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/two-fer/two_fer_test.sh b/exercises/practice/two-fer/two_fer.bats similarity index 95% rename from exercises/practice/two-fer/two_fer_test.sh rename to exercises/practice/two-fer/two_fer.bats index 3bc8ec80..4bf81833 100644 --- a/exercises/practice/two-fer/two_fer_test.sh +++ b/exercises/practice/two-fer/two_fer.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.1 @@ -17,7 +17,7 @@ load bats-extra # You can also run all the tests by setting the # `$BATS_RUN_SKIPPED` environment variable, like this: # - # $ BATS_RUN_SKIPPED=true bats two_fer_test.sh + # $ BATS_RUN_SKIPPED=true bats two_fer.bats run bash two_fer.sh assert_success diff --git a/exercises/practice/variable-length-quantity/.meta/config.json b/exercises/practice/variable-length-quantity/.meta/config.json index 1e5c13ec..ad1caade 100644 --- a/exercises/practice/variable-length-quantity/.meta/config.json +++ b/exercises/practice/variable-length-quantity/.meta/config.json @@ -12,7 +12,7 @@ "variable_length_quantity.sh" ], "test": [ - "variable_length_quantity_test.sh" + "variable_length_quantity.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/variable-length-quantity/variable_length_quantity_test.sh b/exercises/practice/variable-length-quantity/variable_length_quantity.bats similarity index 99% rename from exercises/practice/variable-length-quantity/variable_length_quantity_test.sh rename to exercises/practice/variable-length-quantity/variable_length_quantity.bats index 768b7222..7155e0b8 100644 --- a/exercises/practice/variable-length-quantity/variable_length_quantity_test.sh +++ b/exercises/practice/variable-length-quantity/variable_length_quantity.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/practice/word-count/.meta/config.json b/exercises/practice/word-count/.meta/config.json index 3b913b78..0d0055b2 100644 --- a/exercises/practice/word-count/.meta/config.json +++ b/exercises/practice/word-count/.meta/config.json @@ -21,7 +21,7 @@ "word_count.sh" ], "test": [ - "word_count_test.sh" + "word_count.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/word-count/word_count_test.sh b/exercises/practice/word-count/word_count.bats similarity index 99% rename from exercises/practice/word-count/word_count_test.sh rename to exercises/practice/word-count/word_count.bats index 08dfb956..f53ce679 100644 --- a/exercises/practice/word-count/word_count_test.sh +++ b/exercises/practice/word-count/word_count.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.4.0.1 diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index 9540c9f3..6daabcbc 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -12,7 +12,7 @@ "wordy.sh" ], "test": [ - "wordy_test.sh" + "wordy.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/wordy/wordy_test.sh b/exercises/practice/wordy/wordy.bats similarity index 99% rename from exercises/practice/wordy/wordy_test.sh rename to exercises/practice/wordy/wordy.bats index 6b0a1180..7ea218b3 100644 --- a/exercises/practice/wordy/wordy_test.sh +++ b/exercises/practice/wordy/wordy.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.5.0.0 diff --git a/exercises/practice/yacht/.meta/config.json b/exercises/practice/yacht/.meta/config.json index 6f45acbf..1c0b1ce3 100644 --- a/exercises/practice/yacht/.meta/config.json +++ b/exercises/practice/yacht/.meta/config.json @@ -14,7 +14,7 @@ "yacht.sh" ], "test": [ - "yacht_test.sh" + "yacht.bats" ], "example": [ ".meta/example.sh" diff --git a/exercises/practice/yacht/yacht_test.sh b/exercises/practice/yacht/yacht.bats similarity index 99% rename from exercises/practice/yacht/yacht_test.sh rename to exercises/practice/yacht/yacht.bats index 8e5dd256..6f476073 100644 --- a/exercises/practice/yacht/yacht_test.sh +++ b/exercises/practice/yacht/yacht.bats @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bats load bats-extra # local version: 1.2.0.0 diff --git a/exercises/shared/.docs/tests.md b/exercises/shared/.docs/tests.md index 278c32db..8f613593 100644 --- a/exercises/shared/.docs/tests.md +++ b/exercises/shared/.docs/tests.md @@ -3,17 +3,17 @@ Each exercise contains a test file. Run the tests using the `bats` program. ```bash -bats hello_world_test.sh +bats hello_world.bats ``` -`bats` will need to be installed. +`bats` will need to be installed. See the [Testing on the Bash track](/docs/tracks/bash/tests) page for instructions to install `bats` for your system. ## Help for assert functions The tests use functions from the -[bats-assert](https://github.com/bats-core/bats-assert) library. +[bats-assert](https://github.com/bats-core/bats-assert) library. Help for the various `assert*` functions can be found there. ## Skipped tests @@ -23,11 +23,11 @@ test (the first one) is executed when you run the tests. This is intentional, as it allows you to focus on just making that one test pass. Once it passes, you can enable the next test by commenting out or removing the - [[ $BATS_RUN_SKIPPED == true ]] || skip + [[ $BATS_RUN_SKIPPED == true ]] || skip annotations prepending other tests. To run all tests, including the ones with `skip` annotations, you can run: ```bash -BATS_RUN_SKIPPED=true bats exercise_name_test.sh +BATS_RUN_SKIPPED=true bats exercise_name.bats ``` diff --git a/mentor_tools/bantor b/mentor_tools/bantor index 0d22b876..2f85964a 100755 --- a/mentor_tools/bantor +++ b/mentor_tools/bantor @@ -169,7 +169,7 @@ END_BATS echo "*******************************************" yn "OK to run tests" || return - BATS_RUN_SKIPPED=true bats "${root}_test.sh" + BATS_RUN_SKIPPED=true bats "${root}.bats" } # Default function to display the code.