diff --git a/config.json b/config.json index 5e590017..9812a6de 100644 --- a/config.json +++ b/config.json @@ -21,13 +21,13 @@ "checklist_issue": 30, "files": { "solution": [ - "%{pascal_slug}.rakumod" + "lib/%{pascal_slug}.rakumod" ], "test": [ - "%{kebab_slug}.rakutest" + "t/%{kebab_slug}.rakutest" ], "example": [ - ".meta/solutions/%{pascal_slug}.rakumod" + ".meta/solutions/lib/%{pascal_slug}.rakumod" ], "exemplar": [ ".meta/%{pascal_slug}.rakumod" diff --git a/docs/TESTS.md b/docs/TESTS.md index 42b086c9..67bf09c0 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -3,32 +3,28 @@ ## Run All Tests There is a Raku script with the extension `.rakutest`, which will be used to test your solution. -You can run through the tests by using either of these commands (replacing the exercise name where relevant): +You can run through the tests by using the command: -If the test is in the `t/` directory: -`prove6 --lib` - -If the test is in the top-level directory: -`prove6 hello-world.rakutest` +`prove6` Before you start the exercise, the output will likely look something like: ``` - # Failed test 'Say Hi!' -# at hello-world.rakutest line 11 -# expected: 'Hello, World!' -# got: (Nil) -# Looks like you failed 1 test of 1 -hello-world.rakutest .. Dubious, test returned 1 +# at t/hello-world.rakutest line 6 +# expected: "Hello, World!" +# matcher: 'infix:' +# got: "Goodbye, Mars!" +# You failed 1 test of 1 +t/hello-world.rakutest ... Dubious, test returned 1 Failed 1/1 subtests ``` -You will need to modify the module with the extension `.rakumod`, and -write a solution to pass the tests. Once the tests are passing, the output from -the command above will likely look something like: + +You will need to modify the module with the extension `.rakumod`, contained in the `lib/` directory, and write a solution to pass the tests. +Once the tests are passing, the output from the command above will likely look something like: ``` -hello-world.rakutest .. ok +t/hello-world.rakutest ... ok All tests successful. ``` @@ -42,11 +38,11 @@ In Linux / OS X: ```bash export RAKU_TEST_DIE_ON_FAIL=1 # now all the follow up runs will stop at the first failure -prove6 hello-world.rakutest +prove6 # until we do unset RAKU_TEST_DIE_ON_FAIL # or you can use it for one run like this: -RAKU_TEST_DIE_ON_FAIL=1 prove6 hello-world.rakutest +RAKU_TEST_DIE_ON_FAIL=1 prove6 ``` Or in Windows: @@ -54,7 +50,7 @@ Or in Windows: ``` SET RAKU_TEST_DIE_ON_FAIL=1 REM now all the follow up runs will stop at the first failure -prove6 hello-world.rakutest +prove6 REM until we do set RAKU_TEST_DIE_ON_FAIL= ``` @@ -69,9 +65,6 @@ For more information see the Could not find JSON::Fast ``` -All modules used in the Raku track are included with Rakudo Star. If you get an -error message such as the above when attempting to run a test, then you will either -need to make sure you have the latest distribution of Rakudo Star, or install the -module yourself using a package manager. See the -[Raku documentation on modules](https://docs.raku.org/language/modules#Looking_for_and_installing_modules.) -for information on how to install modules. +All modules used in the Raku track are included with Rakudo Star. +If you get an error message such as the above when attempting to run a test, then you will either need to make sure you have the latest distribution of Rakudo Star, or install the module yourself using a package manager. +See the [Raku documentation on modules](https://docs.raku.org/language/modules#Looking_for_and_installing_modules.) for information on how to install modules. diff --git a/exercises/practice/accumulate/.meta/config.json b/exercises/practice/accumulate/.meta/config.json index 6d99246f..72552f15 100644 --- a/exercises/practice/accumulate/.meta/config.json +++ b/exercises/practice/accumulate/.meta/config.json @@ -10,13 +10,13 @@ ], "files": { "solution": [ - "Accumulate.rakumod" + "lib/Accumulate.rakumod" ], "test": [ - "accumulate.rakutest" + "t/accumulate.rakutest" ], "example": [ - ".meta/solutions/Accumulate.rakumod" + ".meta/solutions/lib/Accumulate.rakumod" ] }, "blurb": "Implement the `accumulate` operation, which, given a collection and an operation to perform on each element of the collection, returns a new collection containing the result of applying that operation to each element of the input collection.", diff --git a/exercises/practice/accumulate/.meta/solutions/accumulate.rakutest b/exercises/practice/accumulate/.meta/solutions/accumulate.rakutest deleted file mode 120000 index 7f703d21..00000000 --- a/exercises/practice/accumulate/.meta/solutions/accumulate.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../accumulate.rakutest \ No newline at end of file diff --git a/exercises/practice/accumulate/.meta/solutions/Accumulate.rakumod b/exercises/practice/accumulate/.meta/solutions/lib/Accumulate.rakumod similarity index 100% rename from exercises/practice/accumulate/.meta/solutions/Accumulate.rakumod rename to exercises/practice/accumulate/.meta/solutions/lib/Accumulate.rakumod diff --git a/exercises/practice/accumulate/.meta/solutions/t/accumulate.rakutest b/exercises/practice/accumulate/.meta/solutions/t/accumulate.rakutest new file mode 120000 index 00000000..07ba9b8f --- /dev/null +++ b/exercises/practice/accumulate/.meta/solutions/t/accumulate.rakutest @@ -0,0 +1 @@ +../../../t/accumulate.rakutest \ No newline at end of file diff --git a/exercises/practice/accumulate/Accumulate.rakumod b/exercises/practice/accumulate/lib/Accumulate.rakumod similarity index 100% rename from exercises/practice/accumulate/Accumulate.rakumod rename to exercises/practice/accumulate/lib/Accumulate.rakumod diff --git a/exercises/practice/accumulate/accumulate.rakutest b/exercises/practice/accumulate/t/accumulate.rakutest similarity index 97% rename from exercises/practice/accumulate/accumulate.rakutest rename to exercises/practice/accumulate/t/accumulate.rakutest index ab052cd6..e3c78fee 100755 --- a/exercises/practice/accumulate/accumulate.rakutest +++ b/exercises/practice/accumulate/t/accumulate.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Accumulate; cmp-ok( # begin: 64d97c14-36dd-44a8-9621-2cecebd6ed23 diff --git a/exercises/practice/acronym/.meta/config.json b/exercises/practice/acronym/.meta/config.json index 324508a4..a13a1755 100644 --- a/exercises/practice/acronym/.meta/config.json +++ b/exercises/practice/acronym/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "Acronym.rakumod" + "lib/Acronym.rakumod" ], "test": [ - "acronym.rakutest" + "t/acronym.rakutest" ], "example": [ - ".meta/solutions/Acronym.rakumod" + ".meta/solutions/lib/Acronym.rakumod" ] }, "blurb": "Convert a long phrase to its acronym.", diff --git a/exercises/practice/acronym/.meta/solutions/acronym.rakutest b/exercises/practice/acronym/.meta/solutions/acronym.rakutest deleted file mode 120000 index 9b233590..00000000 --- a/exercises/practice/acronym/.meta/solutions/acronym.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../acronym.rakutest \ No newline at end of file diff --git a/exercises/practice/acronym/.meta/solutions/Acronym.rakumod b/exercises/practice/acronym/.meta/solutions/lib/Acronym.rakumod similarity index 100% rename from exercises/practice/acronym/.meta/solutions/Acronym.rakumod rename to exercises/practice/acronym/.meta/solutions/lib/Acronym.rakumod diff --git a/exercises/practice/acronym/.meta/solutions/t/acronym.rakutest b/exercises/practice/acronym/.meta/solutions/t/acronym.rakutest new file mode 120000 index 00000000..ad91f771 --- /dev/null +++ b/exercises/practice/acronym/.meta/solutions/t/acronym.rakutest @@ -0,0 +1 @@ +../../../t/acronym.rakutest \ No newline at end of file diff --git a/exercises/practice/acronym/Acronym.rakumod b/exercises/practice/acronym/lib/Acronym.rakumod similarity index 100% rename from exercises/practice/acronym/Acronym.rakumod rename to exercises/practice/acronym/lib/Acronym.rakumod diff --git a/exercises/practice/acronym/acronym.rakutest b/exercises/practice/acronym/t/acronym.rakutest similarity index 97% rename from exercises/practice/acronym/acronym.rakutest rename to exercises/practice/acronym/t/acronym.rakutest index d3e56b2a..73cb414b 100755 --- a/exercises/practice/acronym/acronym.rakutest +++ b/exercises/practice/acronym/t/acronym.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Acronym; cmp-ok( # begin: 1e22cceb-c5e4-4562-9afe-aef07ad1eaf4 diff --git a/exercises/practice/affine-cipher/.meta/config.json b/exercises/practice/affine-cipher/.meta/config.json index 1bbecc42..85a213ca 100644 --- a/exercises/practice/affine-cipher/.meta/config.json +++ b/exercises/practice/affine-cipher/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "AffineCipher.rakumod" + "lib/AffineCipher.rakumod" ], "test": [ - "affine-cipher.rakutest" + "t/affine-cipher.rakutest" ], "example": [ - ".meta/solutions/AffineCipher.rakumod" + ".meta/solutions/lib/AffineCipher.rakumod" ] }, "blurb": "Create an implementation of the Affine cipher, an ancient encryption algorithm from the Middle East.", diff --git a/exercises/practice/affine-cipher/.meta/solutions/affine-cipher.rakutest b/exercises/practice/affine-cipher/.meta/solutions/affine-cipher.rakutest deleted file mode 120000 index e2be973a..00000000 --- a/exercises/practice/affine-cipher/.meta/solutions/affine-cipher.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../affine-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/affine-cipher/.meta/solutions/AffineCipher.rakumod b/exercises/practice/affine-cipher/.meta/solutions/lib/AffineCipher.rakumod similarity index 100% rename from exercises/practice/affine-cipher/.meta/solutions/AffineCipher.rakumod rename to exercises/practice/affine-cipher/.meta/solutions/lib/AffineCipher.rakumod diff --git a/exercises/practice/affine-cipher/.meta/solutions/t/affine-cipher.rakutest b/exercises/practice/affine-cipher/.meta/solutions/t/affine-cipher.rakutest new file mode 120000 index 00000000..926b534e --- /dev/null +++ b/exercises/practice/affine-cipher/.meta/solutions/t/affine-cipher.rakutest @@ -0,0 +1 @@ +../../../t/affine-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/affine-cipher/AffineCipher.rakumod b/exercises/practice/affine-cipher/lib/AffineCipher.rakumod similarity index 100% rename from exercises/practice/affine-cipher/AffineCipher.rakumod rename to exercises/practice/affine-cipher/lib/AffineCipher.rakumod diff --git a/exercises/practice/affine-cipher/affine-cipher.rakutest b/exercises/practice/affine-cipher/t/affine-cipher.rakutest similarity index 98% rename from exercises/practice/affine-cipher/affine-cipher.rakutest rename to exercises/practice/affine-cipher/t/affine-cipher.rakutest index 997bb32e..8a273ef7 100755 --- a/exercises/practice/affine-cipher/affine-cipher.rakutest +++ b/exercises/practice/affine-cipher/t/affine-cipher.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use AffineCipher; cmp-ok( # begin: 2ee1d9af-1c43-416c-b41b-cefd7d4d2b2a diff --git a/exercises/practice/all-your-base/.meta/config.json b/exercises/practice/all-your-base/.meta/config.json index a41a31be..e16ad2ae 100644 --- a/exercises/practice/all-your-base/.meta/config.json +++ b/exercises/practice/all-your-base/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "AllYourBase.rakumod" + "lib/AllYourBase.rakumod" ], "test": [ - "all-your-base.rakutest" + "t/all-your-base.rakutest" ], "example": [ - ".meta/solutions/AllYourBase.rakumod" + ".meta/solutions/lib/AllYourBase.rakumod" ] }, "blurb": "Convert a number, represented as a sequence of digits in one base, to any other base." diff --git a/exercises/practice/all-your-base/.meta/solutions/all-your-base.rakutest b/exercises/practice/all-your-base/.meta/solutions/all-your-base.rakutest deleted file mode 120000 index f07fa55b..00000000 --- a/exercises/practice/all-your-base/.meta/solutions/all-your-base.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../all-your-base.rakutest \ No newline at end of file diff --git a/exercises/practice/all-your-base/.meta/solutions/AllYourBase.rakumod b/exercises/practice/all-your-base/.meta/solutions/lib/AllYourBase.rakumod similarity index 100% rename from exercises/practice/all-your-base/.meta/solutions/AllYourBase.rakumod rename to exercises/practice/all-your-base/.meta/solutions/lib/AllYourBase.rakumod diff --git a/exercises/practice/all-your-base/.meta/solutions/t/all-your-base.rakutest b/exercises/practice/all-your-base/.meta/solutions/t/all-your-base.rakutest new file mode 120000 index 00000000..ffd12706 --- /dev/null +++ b/exercises/practice/all-your-base/.meta/solutions/t/all-your-base.rakutest @@ -0,0 +1 @@ +../../../t/all-your-base.rakutest \ No newline at end of file diff --git a/exercises/practice/all-your-base/AllYourBase.rakumod b/exercises/practice/all-your-base/lib/AllYourBase.rakumod similarity index 100% rename from exercises/practice/all-your-base/AllYourBase.rakumod rename to exercises/practice/all-your-base/lib/AllYourBase.rakumod diff --git a/exercises/practice/all-your-base/all-your-base.rakutest b/exercises/practice/all-your-base/t/all-your-base.rakutest similarity index 99% rename from exercises/practice/all-your-base/all-your-base.rakutest rename to exercises/practice/all-your-base/t/all-your-base.rakutest index ef0ef735..4045bf44 100755 --- a/exercises/practice/all-your-base/all-your-base.rakutest +++ b/exercises/practice/all-your-base/t/all-your-base.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use AllYourBase; cmp-ok( # begin: 5ce422f9-7a4b-4f44-ad29-49c67cb32d2c diff --git a/exercises/practice/allergies/.meta/config.json b/exercises/practice/allergies/.meta/config.json index ea05ff08..e6ea5466 100644 --- a/exercises/practice/allergies/.meta/config.json +++ b/exercises/practice/allergies/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "Allergies.rakumod" + "lib/Allergies.rakumod" ], "test": [ - "allergies.rakutest" + "t/allergies.rakutest" ], "example": [ - ".meta/solutions/Allergies.rakumod" + ".meta/solutions/lib/Allergies.rakumod" ] }, "blurb": "Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.", diff --git a/exercises/practice/allergies/.meta/solutions/allergies.rakutest b/exercises/practice/allergies/.meta/solutions/allergies.rakutest deleted file mode 120000 index acecfb77..00000000 --- a/exercises/practice/allergies/.meta/solutions/allergies.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../allergies.rakutest \ No newline at end of file diff --git a/exercises/practice/allergies/.meta/solutions/Allergies.rakumod b/exercises/practice/allergies/.meta/solutions/lib/Allergies.rakumod similarity index 100% rename from exercises/practice/allergies/.meta/solutions/Allergies.rakumod rename to exercises/practice/allergies/.meta/solutions/lib/Allergies.rakumod diff --git a/exercises/practice/allergies/.meta/solutions/t/allergies.rakutest b/exercises/practice/allergies/.meta/solutions/t/allergies.rakutest new file mode 120000 index 00000000..813a9fae --- /dev/null +++ b/exercises/practice/allergies/.meta/solutions/t/allergies.rakutest @@ -0,0 +1 @@ +../../../t/allergies.rakutest \ No newline at end of file diff --git a/exercises/practice/allergies/Allergies.rakumod b/exercises/practice/allergies/lib/Allergies.rakumod similarity index 100% rename from exercises/practice/allergies/Allergies.rakumod rename to exercises/practice/allergies/lib/Allergies.rakumod diff --git a/exercises/practice/allergies/allergies.rakutest b/exercises/practice/allergies/t/allergies.rakutest similarity index 99% rename from exercises/practice/allergies/allergies.rakutest rename to exercises/practice/allergies/t/allergies.rakutest index 761f1e2a..a280a217 100755 --- a/exercises/practice/allergies/allergies.rakutest +++ b/exercises/practice/allergies/t/allergies.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Allergies; cmp-ok( # begin: 17fc7296-2440-4ac4-ad7b-d07c321bc5a0 diff --git a/exercises/practice/anagram/.meta/config.json b/exercises/practice/anagram/.meta/config.json index 69d65974..862e1007 100644 --- a/exercises/practice/anagram/.meta/config.json +++ b/exercises/practice/anagram/.meta/config.json @@ -11,13 +11,13 @@ ], "files": { "solution": [ - "Anagram.rakumod" + "lib/Anagram.rakumod" ], "test": [ - "anagram.rakutest" + "t/anagram.rakutest" ], "example": [ - ".meta/solutions/Anagram.rakumod" + ".meta/solutions/lib/Anagram.rakumod" ] }, "blurb": "Given a word and a list of possible anagrams, select the correct sublist.", diff --git a/exercises/practice/anagram/.meta/solutions/anagram.rakutest b/exercises/practice/anagram/.meta/solutions/anagram.rakutest deleted file mode 120000 index 3e7f0906..00000000 --- a/exercises/practice/anagram/.meta/solutions/anagram.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../anagram.rakutest \ No newline at end of file diff --git a/exercises/practice/anagram/.meta/solutions/Anagram.rakumod b/exercises/practice/anagram/.meta/solutions/lib/Anagram.rakumod similarity index 100% rename from exercises/practice/anagram/.meta/solutions/Anagram.rakumod rename to exercises/practice/anagram/.meta/solutions/lib/Anagram.rakumod diff --git a/exercises/practice/anagram/.meta/solutions/t/anagram.rakutest b/exercises/practice/anagram/.meta/solutions/t/anagram.rakutest new file mode 120000 index 00000000..5dbd1b34 --- /dev/null +++ b/exercises/practice/anagram/.meta/solutions/t/anagram.rakutest @@ -0,0 +1 @@ +../../../t/anagram.rakutest \ No newline at end of file diff --git a/exercises/practice/anagram/Anagram.rakumod b/exercises/practice/anagram/lib/Anagram.rakumod similarity index 100% rename from exercises/practice/anagram/Anagram.rakumod rename to exercises/practice/anagram/lib/Anagram.rakumod diff --git a/exercises/practice/anagram/anagram.rakutest b/exercises/practice/anagram/t/anagram.rakutest similarity index 99% rename from exercises/practice/anagram/anagram.rakutest rename to exercises/practice/anagram/t/anagram.rakutest index 57ef6f1f..6cbb5274 100755 --- a/exercises/practice/anagram/anagram.rakutest +++ b/exercises/practice/anagram/t/anagram.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Anagram; cmp-ok( # begin: dd40c4d2-3c8b-44e5-992a-f42b393ec373 diff --git a/exercises/practice/armstrong-numbers/.meta/config.json b/exercises/practice/armstrong-numbers/.meta/config.json index c58e688b..c0851fd8 100644 --- a/exercises/practice/armstrong-numbers/.meta/config.json +++ b/exercises/practice/armstrong-numbers/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "ArmstrongNumbers.rakumod" + "lib/ArmstrongNumbers.rakumod" ], "test": [ - "armstrong-numbers.rakutest" + "t/armstrong-numbers.rakutest" ], "example": [ - ".meta/solutions/ArmstrongNumbers.rakumod" + ".meta/solutions/lib/ArmstrongNumbers.rakumod" ] }, "blurb": "Determine if a number is an Armstrong number.", diff --git a/exercises/practice/armstrong-numbers/.meta/solutions/armstrong-numbers.rakutest b/exercises/practice/armstrong-numbers/.meta/solutions/armstrong-numbers.rakutest deleted file mode 120000 index ee4f7759..00000000 --- a/exercises/practice/armstrong-numbers/.meta/solutions/armstrong-numbers.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../armstrong-numbers.rakutest \ No newline at end of file diff --git a/exercises/practice/armstrong-numbers/.meta/solutions/ArmstrongNumbers.rakumod b/exercises/practice/armstrong-numbers/.meta/solutions/lib/ArmstrongNumbers.rakumod similarity index 100% rename from exercises/practice/armstrong-numbers/.meta/solutions/ArmstrongNumbers.rakumod rename to exercises/practice/armstrong-numbers/.meta/solutions/lib/ArmstrongNumbers.rakumod diff --git a/exercises/practice/armstrong-numbers/.meta/solutions/t/armstrong-numbers.rakutest b/exercises/practice/armstrong-numbers/.meta/solutions/t/armstrong-numbers.rakutest new file mode 120000 index 00000000..7366d1ef --- /dev/null +++ b/exercises/practice/armstrong-numbers/.meta/solutions/t/armstrong-numbers.rakutest @@ -0,0 +1 @@ +../../../t/armstrong-numbers.rakutest \ No newline at end of file diff --git a/exercises/practice/armstrong-numbers/ArmstrongNumbers.rakumod b/exercises/practice/armstrong-numbers/lib/ArmstrongNumbers.rakumod similarity index 100% rename from exercises/practice/armstrong-numbers/ArmstrongNumbers.rakumod rename to exercises/practice/armstrong-numbers/lib/ArmstrongNumbers.rakumod diff --git a/exercises/practice/armstrong-numbers/armstrong-numbers.rakutest b/exercises/practice/armstrong-numbers/t/armstrong-numbers.rakutest similarity index 98% rename from exercises/practice/armstrong-numbers/armstrong-numbers.rakutest rename to exercises/practice/armstrong-numbers/t/armstrong-numbers.rakutest index b7cfbdb6..8ea441ba 100755 --- a/exercises/practice/armstrong-numbers/armstrong-numbers.rakutest +++ b/exercises/practice/armstrong-numbers/t/armstrong-numbers.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ArmstrongNumbers; cmp-ok( # begin: c1ed103c-258d-45b2-be73-d8c6d9580c7b diff --git a/exercises/practice/atbash-cipher/.meta/config.json b/exercises/practice/atbash-cipher/.meta/config.json index 758ef80a..bc3c5f35 100644 --- a/exercises/practice/atbash-cipher/.meta/config.json +++ b/exercises/practice/atbash-cipher/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "AtbashCipher.rakumod" + "lib/AtbashCipher.rakumod" ], "test": [ - "atbash-cipher.rakutest" + "t/atbash-cipher.rakutest" ], "example": [ - ".meta/solutions/AtbashCipher.rakumod" + ".meta/solutions/lib/AtbashCipher.rakumod" ] }, "blurb": "Create an implementation of the atbash cipher, an ancient encryption system created in the Middle East.", diff --git a/exercises/practice/atbash-cipher/.meta/solutions/atbash-cipher.rakutest b/exercises/practice/atbash-cipher/.meta/solutions/atbash-cipher.rakutest deleted file mode 120000 index 3445db0b..00000000 --- a/exercises/practice/atbash-cipher/.meta/solutions/atbash-cipher.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../atbash-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/atbash-cipher/.meta/solutions/AtbashCipher.rakumod b/exercises/practice/atbash-cipher/.meta/solutions/lib/AtbashCipher.rakumod similarity index 100% rename from exercises/practice/atbash-cipher/.meta/solutions/AtbashCipher.rakumod rename to exercises/practice/atbash-cipher/.meta/solutions/lib/AtbashCipher.rakumod diff --git a/exercises/practice/atbash-cipher/.meta/solutions/t/atbash-cipher.rakutest b/exercises/practice/atbash-cipher/.meta/solutions/t/atbash-cipher.rakutest new file mode 120000 index 00000000..ad1d2f58 --- /dev/null +++ b/exercises/practice/atbash-cipher/.meta/solutions/t/atbash-cipher.rakutest @@ -0,0 +1 @@ +../../../t/atbash-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/atbash-cipher/AtbashCipher.rakumod b/exercises/practice/atbash-cipher/lib/AtbashCipher.rakumod similarity index 100% rename from exercises/practice/atbash-cipher/AtbashCipher.rakumod rename to exercises/practice/atbash-cipher/lib/AtbashCipher.rakumod diff --git a/exercises/practice/atbash-cipher/atbash-cipher.rakutest b/exercises/practice/atbash-cipher/t/atbash-cipher.rakutest similarity index 98% rename from exercises/practice/atbash-cipher/atbash-cipher.rakutest rename to exercises/practice/atbash-cipher/t/atbash-cipher.rakutest index 39f4252c..f553633b 100755 --- a/exercises/practice/atbash-cipher/atbash-cipher.rakutest +++ b/exercises/practice/atbash-cipher/t/atbash-cipher.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use AtbashCipher; cmp-ok( # begin: 2f47ebe1-eab9-4d6b-b3c6-627562a31c77 diff --git a/exercises/practice/beer-song/.meta/config.json b/exercises/practice/beer-song/.meta/config.json index 36567a4a..4cb3d412 100644 --- a/exercises/practice/beer-song/.meta/config.json +++ b/exercises/practice/beer-song/.meta/config.json @@ -2,13 +2,13 @@ "authors": ["m-dango"], "files": { "solution": [ - "BeerSong.rakumod" + "lib/BeerSong.rakumod" ], "test": [ - "beer-song.rakutest" + "t/beer-song.rakutest" ], "example": [ - ".meta/solutions/BeerSong.rakumod" + ".meta/solutions/lib/BeerSong.rakumod" ] }, "blurb": "Produce the lyrics to that beloved classic, that field-trip favorite: 99 Bottles of Beer on the Wall.", diff --git a/exercises/practice/beer-song/.meta/solutions/beer-song.rakutest b/exercises/practice/beer-song/.meta/solutions/beer-song.rakutest deleted file mode 120000 index 97542400..00000000 --- a/exercises/practice/beer-song/.meta/solutions/beer-song.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../beer-song.rakutest \ No newline at end of file diff --git a/exercises/practice/beer-song/.meta/solutions/BeerSong.rakumod b/exercises/practice/beer-song/.meta/solutions/lib/BeerSong.rakumod similarity index 100% rename from exercises/practice/beer-song/.meta/solutions/BeerSong.rakumod rename to exercises/practice/beer-song/.meta/solutions/lib/BeerSong.rakumod diff --git a/exercises/practice/beer-song/.meta/solutions/t/beer-song.rakutest b/exercises/practice/beer-song/.meta/solutions/t/beer-song.rakutest new file mode 120000 index 00000000..b540deb6 --- /dev/null +++ b/exercises/practice/beer-song/.meta/solutions/t/beer-song.rakutest @@ -0,0 +1 @@ +../../../t/beer-song.rakutest \ No newline at end of file diff --git a/exercises/practice/beer-song/BeerSong.rakumod b/exercises/practice/beer-song/lib/BeerSong.rakumod similarity index 100% rename from exercises/practice/beer-song/BeerSong.rakumod rename to exercises/practice/beer-song/lib/BeerSong.rakumod diff --git a/exercises/practice/beer-song/beer-song.rakutest b/exercises/practice/beer-song/t/beer-song.rakutest similarity index 99% rename from exercises/practice/beer-song/beer-song.rakutest rename to exercises/practice/beer-song/t/beer-song.rakutest index 41843a00..e7a5b237 100755 --- a/exercises/practice/beer-song/beer-song.rakutest +++ b/exercises/practice/beer-song/t/beer-song.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use BeerSong; cmp-ok( # begin: 5a02fd08-d336-4607-8006-246fe6fa9fb0 diff --git a/exercises/practice/binary-search-tree/.meta/config.json b/exercises/practice/binary-search-tree/.meta/config.json index a8307fdf..4ee51b07 100644 --- a/exercises/practice/binary-search-tree/.meta/config.json +++ b/exercises/practice/binary-search-tree/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "BinarySearchTree.rakumod" + "lib/BinarySearchTree.rakumod" ], "test": [ - "binary-search-tree.rakutest" + "t/binary-search-tree.rakutest" ], "example": [ - ".meta/solutions/BinarySearchTree.rakumod" + ".meta/solutions/lib/BinarySearchTree.rakumod" ] }, "blurb": "Insert and search for numbers in a binary tree.", diff --git a/exercises/practice/binary-search-tree/.meta/solutions/binary-search-tree.rakutest b/exercises/practice/binary-search-tree/.meta/solutions/binary-search-tree.rakutest deleted file mode 120000 index 2b0a7cf3..00000000 --- a/exercises/practice/binary-search-tree/.meta/solutions/binary-search-tree.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../binary-search-tree.rakutest \ No newline at end of file diff --git a/exercises/practice/binary-search-tree/.meta/solutions/BinarySearchTree.rakumod b/exercises/practice/binary-search-tree/.meta/solutions/lib/BinarySearchTree.rakumod similarity index 100% rename from exercises/practice/binary-search-tree/.meta/solutions/BinarySearchTree.rakumod rename to exercises/practice/binary-search-tree/.meta/solutions/lib/BinarySearchTree.rakumod diff --git a/exercises/practice/binary-search-tree/.meta/solutions/t/binary-search-tree.rakutest b/exercises/practice/binary-search-tree/.meta/solutions/t/binary-search-tree.rakutest new file mode 120000 index 00000000..c7f27331 --- /dev/null +++ b/exercises/practice/binary-search-tree/.meta/solutions/t/binary-search-tree.rakutest @@ -0,0 +1 @@ +../../../t/binary-search-tree.rakutest \ No newline at end of file diff --git a/exercises/practice/binary-search-tree/BinarySearchTree.rakumod b/exercises/practice/binary-search-tree/lib/BinarySearchTree.rakumod similarity index 100% rename from exercises/practice/binary-search-tree/BinarySearchTree.rakumod rename to exercises/practice/binary-search-tree/lib/BinarySearchTree.rakumod diff --git a/exercises/practice/binary-search-tree/binary-search-tree.rakutest b/exercises/practice/binary-search-tree/t/binary-search-tree.rakutest similarity index 97% rename from exercises/practice/binary-search-tree/binary-search-tree.rakutest rename to exercises/practice/binary-search-tree/t/binary-search-tree.rakutest index abe9efe7..4656c43f 100755 --- a/exercises/practice/binary-search-tree/binary-search-tree.rakutest +++ b/exercises/practice/binary-search-tree/t/binary-search-tree.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use BinarySearchTree; my BinarySearchTree $bst; diff --git a/exercises/practice/binary-search/.meta/config.json b/exercises/practice/binary-search/.meta/config.json index c42018ef..83cdb74a 100644 --- a/exercises/practice/binary-search/.meta/config.json +++ b/exercises/practice/binary-search/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "BinarySearch.rakumod" + "lib/BinarySearch.rakumod" ], "test": [ - "binary-search.rakutest" + "t/binary-search.rakutest" ], "example": [ - ".meta/solutions/BinarySearch.rakumod" + ".meta/solutions/lib/BinarySearch.rakumod" ] }, "blurb": "Implement a binary search algorithm.", diff --git a/exercises/practice/binary-search/.meta/solutions/binary-search.rakutest b/exercises/practice/binary-search/.meta/solutions/binary-search.rakutest deleted file mode 120000 index 2e1061d2..00000000 --- a/exercises/practice/binary-search/.meta/solutions/binary-search.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../binary-search.rakutest \ No newline at end of file diff --git a/exercises/practice/binary-search/.meta/solutions/BinarySearch.rakumod b/exercises/practice/binary-search/.meta/solutions/lib/BinarySearch.rakumod similarity index 100% rename from exercises/practice/binary-search/.meta/solutions/BinarySearch.rakumod rename to exercises/practice/binary-search/.meta/solutions/lib/BinarySearch.rakumod diff --git a/exercises/practice/binary-search/.meta/solutions/t/binary-search.rakutest b/exercises/practice/binary-search/.meta/solutions/t/binary-search.rakutest new file mode 120000 index 00000000..6cac7f1d --- /dev/null +++ b/exercises/practice/binary-search/.meta/solutions/t/binary-search.rakutest @@ -0,0 +1 @@ +../../../t/binary-search.rakutest \ No newline at end of file diff --git a/exercises/practice/binary-search/BinarySearch.rakumod b/exercises/practice/binary-search/lib/BinarySearch.rakumod similarity index 100% rename from exercises/practice/binary-search/BinarySearch.rakumod rename to exercises/practice/binary-search/lib/BinarySearch.rakumod diff --git a/exercises/practice/binary-search/binary-search.rakutest b/exercises/practice/binary-search/t/binary-search.rakutest similarity index 98% rename from exercises/practice/binary-search/binary-search.rakutest rename to exercises/practice/binary-search/t/binary-search.rakutest index e6ef293e..1ab8a580 100755 --- a/exercises/practice/binary-search/binary-search.rakutest +++ b/exercises/practice/binary-search/t/binary-search.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use BinarySearch; cmp-ok( # begin: b55c24a9-a98d-4379-a08c-2adcf8ebeee8 diff --git a/exercises/practice/bob/.meta/config.json b/exercises/practice/bob/.meta/config.json index 791e73ad..d1cef85d 100644 --- a/exercises/practice/bob/.meta/config.json +++ b/exercises/practice/bob/.meta/config.json @@ -11,13 +11,13 @@ ], "files": { "solution": [ - "Bob.rakumod" + "lib/Bob.rakumod" ], "test": [ - "bob.rakutest" + "t/bob.rakutest" ], "example": [ - ".meta/solutions/Bob.rakumod" + ".meta/solutions/lib/Bob.rakumod" ] }, "blurb": "Bob is a lackadaisical teenager. In conversation, his responses are very limited.", diff --git a/exercises/practice/bob/.meta/solutions/bob.rakutest b/exercises/practice/bob/.meta/solutions/bob.rakutest deleted file mode 120000 index 1c17d43d..00000000 --- a/exercises/practice/bob/.meta/solutions/bob.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../bob.rakutest \ No newline at end of file diff --git a/exercises/practice/bob/.meta/solutions/Bob.rakumod b/exercises/practice/bob/.meta/solutions/lib/Bob.rakumod similarity index 100% rename from exercises/practice/bob/.meta/solutions/Bob.rakumod rename to exercises/practice/bob/.meta/solutions/lib/Bob.rakumod diff --git a/exercises/practice/bob/.meta/solutions/t/bob.rakutest b/exercises/practice/bob/.meta/solutions/t/bob.rakutest new file mode 120000 index 00000000..1fa210b6 --- /dev/null +++ b/exercises/practice/bob/.meta/solutions/t/bob.rakutest @@ -0,0 +1 @@ +../../../t/bob.rakutest \ No newline at end of file diff --git a/exercises/practice/bob/Bob.rakumod b/exercises/practice/bob/lib/Bob.rakumod similarity index 100% rename from exercises/practice/bob/Bob.rakumod rename to exercises/practice/bob/lib/Bob.rakumod diff --git a/exercises/practice/bob/bob.rakutest b/exercises/practice/bob/t/bob.rakutest similarity index 98% rename from exercises/practice/bob/bob.rakutest rename to exercises/practice/bob/t/bob.rakutest index bdf9ba1b..433515f9 100755 --- a/exercises/practice/bob/bob.rakutest +++ b/exercises/practice/bob/t/bob.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; #`[Look for the package inside the same directory as this test file.] +use lib $?FILE.IO.parent(2).add('lib'); #`[Look for the package inside the same directory as this test file.] use Bob; cmp-ok( # begin: e162fead-606f-437a-a166-d051915cea8e diff --git a/exercises/practice/book-store/.meta/config.json b/exercises/practice/book-store/.meta/config.json index 24ec8927..0a994b0c 100644 --- a/exercises/practice/book-store/.meta/config.json +++ b/exercises/practice/book-store/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "BookStore.rakumod" + "lib/BookStore.rakumod" ], "test": [ - "book-store.rakutest" + "t/book-store.rakutest" ], "example": [ - ".meta/solutions/BookStore.rakumod" + ".meta/solutions/lib/BookStore.rakumod" ] }, "blurb": "To try and encourage more sales of different books from a popular 5 book series, a bookshop has decided to offer discounts of multiple-book purchases.", diff --git a/exercises/practice/book-store/.meta/solutions/book-store.rakutest b/exercises/practice/book-store/.meta/solutions/book-store.rakutest deleted file mode 120000 index aa716365..00000000 --- a/exercises/practice/book-store/.meta/solutions/book-store.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../book-store.rakutest \ No newline at end of file diff --git a/exercises/practice/book-store/.meta/solutions/BookStore.rakumod b/exercises/practice/book-store/.meta/solutions/lib/BookStore.rakumod similarity index 100% rename from exercises/practice/book-store/.meta/solutions/BookStore.rakumod rename to exercises/practice/book-store/.meta/solutions/lib/BookStore.rakumod diff --git a/exercises/practice/book-store/.meta/solutions/t/book-store.rakutest b/exercises/practice/book-store/.meta/solutions/t/book-store.rakutest new file mode 120000 index 00000000..bf773143 --- /dev/null +++ b/exercises/practice/book-store/.meta/solutions/t/book-store.rakutest @@ -0,0 +1 @@ +../../../t/book-store.rakutest \ No newline at end of file diff --git a/exercises/practice/book-store/BookStore.rakumod b/exercises/practice/book-store/lib/BookStore.rakumod similarity index 100% rename from exercises/practice/book-store/BookStore.rakumod rename to exercises/practice/book-store/lib/BookStore.rakumod diff --git a/exercises/practice/book-store/book-store.rakutest b/exercises/practice/book-store/t/book-store.rakutest similarity index 99% rename from exercises/practice/book-store/book-store.rakutest rename to exercises/practice/book-store/t/book-store.rakutest index f467c7e7..aa6342c9 100755 --- a/exercises/practice/book-store/book-store.rakutest +++ b/exercises/practice/book-store/t/book-store.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use BookStore; cmp-ok( # begin: 17146bd5-2e80-4557-ab4c-05632b6b0d01 diff --git a/exercises/practice/bottle-song/.meta/config.json b/exercises/practice/bottle-song/.meta/config.json index 203d1446..b9262efd 100644 --- a/exercises/practice/bottle-song/.meta/config.json +++ b/exercises/practice/bottle-song/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "BottleSong.rakumod" + "lib/BottleSong.rakumod" ], "test": [ - "bottle-song.rakutest" + "t/bottle-song.rakutest" ], "example": [ - ".meta/solutions/BottleSong.rakumod" + ".meta/solutions/lib/BottleSong.rakumod" ] }, "blurb": "Produce the lyrics to the popular children's repetitive song: Ten Green Bottles.", diff --git a/exercises/practice/bottle-song/.meta/solutions/bottle-song.rakutest b/exercises/practice/bottle-song/.meta/solutions/bottle-song.rakutest deleted file mode 120000 index 932a1f63..00000000 --- a/exercises/practice/bottle-song/.meta/solutions/bottle-song.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../bottle-song.rakutest \ No newline at end of file diff --git a/exercises/practice/bottle-song/.meta/solutions/BottleSong.rakumod b/exercises/practice/bottle-song/.meta/solutions/lib/BottleSong.rakumod similarity index 100% rename from exercises/practice/bottle-song/.meta/solutions/BottleSong.rakumod rename to exercises/practice/bottle-song/.meta/solutions/lib/BottleSong.rakumod diff --git a/exercises/practice/bottle-song/.meta/solutions/t/bottle-song.rakutest b/exercises/practice/bottle-song/.meta/solutions/t/bottle-song.rakutest new file mode 120000 index 00000000..d3b93c1b --- /dev/null +++ b/exercises/practice/bottle-song/.meta/solutions/t/bottle-song.rakutest @@ -0,0 +1 @@ +../../../t/bottle-song.rakutest \ No newline at end of file diff --git a/exercises/practice/bottle-song/BottleSong.rakumod b/exercises/practice/bottle-song/lib/BottleSong.rakumod similarity index 100% rename from exercises/practice/bottle-song/BottleSong.rakumod rename to exercises/practice/bottle-song/lib/BottleSong.rakumod diff --git a/exercises/practice/bottle-song/bottle-song.rakutest b/exercises/practice/bottle-song/t/bottle-song.rakutest similarity index 99% rename from exercises/practice/bottle-song/bottle-song.rakutest rename to exercises/practice/bottle-song/t/bottle-song.rakutest index 0fc19050..bd66d537 100755 --- a/exercises/practice/bottle-song/bottle-song.rakutest +++ b/exercises/practice/bottle-song/t/bottle-song.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use BottleSong; cmp-ok( # begin: d4ccf8fc-01dc-48c0-a201-4fbeb30f2d03 diff --git a/exercises/practice/clock/.meta/config.json b/exercises/practice/clock/.meta/config.json index a08b7922..ed78c3ad 100644 --- a/exercises/practice/clock/.meta/config.json +++ b/exercises/practice/clock/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "Clock.rakumod" + "lib/Clock.rakumod" ], "test": [ - "clock.rakutest" + "t/clock.rakutest" ], "example": [ - ".meta/solutions/Clock.rakumod" + ".meta/solutions/lib/Clock.rakumod" ] }, "blurb": "Implement a clock that handles times without dates.", diff --git a/exercises/practice/clock/.meta/solutions/clock.rakutest b/exercises/practice/clock/.meta/solutions/clock.rakutest deleted file mode 120000 index 6fa52c65..00000000 --- a/exercises/practice/clock/.meta/solutions/clock.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../clock.rakutest \ No newline at end of file diff --git a/exercises/practice/clock/.meta/solutions/Clock.rakumod b/exercises/practice/clock/.meta/solutions/lib/Clock.rakumod similarity index 100% rename from exercises/practice/clock/.meta/solutions/Clock.rakumod rename to exercises/practice/clock/.meta/solutions/lib/Clock.rakumod diff --git a/exercises/practice/clock/.meta/solutions/t/clock.rakutest b/exercises/practice/clock/.meta/solutions/t/clock.rakutest new file mode 120000 index 00000000..537ae1b2 --- /dev/null +++ b/exercises/practice/clock/.meta/solutions/t/clock.rakutest @@ -0,0 +1 @@ +../../../t/clock.rakutest \ No newline at end of file diff --git a/exercises/practice/clock/Clock.rakumod b/exercises/practice/clock/lib/Clock.rakumod similarity index 100% rename from exercises/practice/clock/Clock.rakumod rename to exercises/practice/clock/lib/Clock.rakumod diff --git a/exercises/practice/clock/clock.rakutest b/exercises/practice/clock/t/clock.rakutest similarity index 99% rename from exercises/practice/clock/clock.rakutest rename to exercises/practice/clock/t/clock.rakutest index 84554d0d..e1cc69da 100755 --- a/exercises/practice/clock/clock.rakutest +++ b/exercises/practice/clock/t/clock.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Clock; cmp-ok( # begin: a577bacc-106b-496e-9792-b3083ea8705e diff --git a/exercises/practice/collatz-conjecture/.meta/config.json b/exercises/practice/collatz-conjecture/.meta/config.json index 5e1befef..0a20b7a9 100644 --- a/exercises/practice/collatz-conjecture/.meta/config.json +++ b/exercises/practice/collatz-conjecture/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "CollatzConjecture.rakumod" + "lib/CollatzConjecture.rakumod" ], "test": [ - "collatz-conjecture.rakutest" + "t/collatz-conjecture.rakutest" ], "example": [ - ".meta/solutions/CollatzConjecture.rakumod" + ".meta/solutions/lib/CollatzConjecture.rakumod" ] }, "blurb": "Calculate the number of steps to reach 1 using the Collatz conjecture.", diff --git a/exercises/practice/collatz-conjecture/.meta/solutions/collatz-conjecture.rakutest b/exercises/practice/collatz-conjecture/.meta/solutions/collatz-conjecture.rakutest deleted file mode 120000 index f20a04ff..00000000 --- a/exercises/practice/collatz-conjecture/.meta/solutions/collatz-conjecture.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../collatz-conjecture.rakutest \ No newline at end of file diff --git a/exercises/practice/collatz-conjecture/.meta/solutions/CollatzConjecture.rakumod b/exercises/practice/collatz-conjecture/.meta/solutions/lib/CollatzConjecture.rakumod similarity index 100% rename from exercises/practice/collatz-conjecture/.meta/solutions/CollatzConjecture.rakumod rename to exercises/practice/collatz-conjecture/.meta/solutions/lib/CollatzConjecture.rakumod diff --git a/exercises/practice/collatz-conjecture/.meta/solutions/t/collatz-conjecture.rakutest b/exercises/practice/collatz-conjecture/.meta/solutions/t/collatz-conjecture.rakutest new file mode 120000 index 00000000..8b0b5cfa --- /dev/null +++ b/exercises/practice/collatz-conjecture/.meta/solutions/t/collatz-conjecture.rakutest @@ -0,0 +1 @@ +../../../t/collatz-conjecture.rakutest \ No newline at end of file diff --git a/exercises/practice/collatz-conjecture/CollatzConjecture.rakumod b/exercises/practice/collatz-conjecture/lib/CollatzConjecture.rakumod similarity index 100% rename from exercises/practice/collatz-conjecture/CollatzConjecture.rakumod rename to exercises/practice/collatz-conjecture/lib/CollatzConjecture.rakumod diff --git a/exercises/practice/collatz-conjecture/collatz-conjecture.rakutest b/exercises/practice/collatz-conjecture/t/collatz-conjecture.rakutest similarity index 97% rename from exercises/practice/collatz-conjecture/collatz-conjecture.rakutest rename to exercises/practice/collatz-conjecture/t/collatz-conjecture.rakutest index 569ebb21..150e63f7 100755 --- a/exercises/practice/collatz-conjecture/collatz-conjecture.rakutest +++ b/exercises/practice/collatz-conjecture/t/collatz-conjecture.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use CollatzConjecture; cmp-ok( # begin: 540a3d51-e7a6-47a5-92a3-4ad1838f0bfd diff --git a/exercises/practice/crypto-square/.meta/config.json b/exercises/practice/crypto-square/.meta/config.json index 65590b57..aca8a8a8 100644 --- a/exercises/practice/crypto-square/.meta/config.json +++ b/exercises/practice/crypto-square/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "CryptoSquare.rakumod" + "lib/CryptoSquare.rakumod" ], "test": [ - "crypto-square.rakutest" + "t/crypto-square.rakutest" ], "example": [ - ".meta/solutions/CryptoSquare.rakumod" + ".meta/solutions/lib/CryptoSquare.rakumod" ] }, "blurb": "Implement the classic method for composing secret messages called a square code.", diff --git a/exercises/practice/crypto-square/.meta/solutions/crypto-square.rakutest b/exercises/practice/crypto-square/.meta/solutions/crypto-square.rakutest deleted file mode 120000 index 5a66f6c8..00000000 --- a/exercises/practice/crypto-square/.meta/solutions/crypto-square.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../crypto-square.rakutest \ No newline at end of file diff --git a/exercises/practice/crypto-square/.meta/solutions/CryptoSquare.rakumod b/exercises/practice/crypto-square/.meta/solutions/lib/CryptoSquare.rakumod similarity index 100% rename from exercises/practice/crypto-square/.meta/solutions/CryptoSquare.rakumod rename to exercises/practice/crypto-square/.meta/solutions/lib/CryptoSquare.rakumod diff --git a/exercises/practice/crypto-square/.meta/solutions/t/crypto-square.rakutest b/exercises/practice/crypto-square/.meta/solutions/t/crypto-square.rakutest new file mode 120000 index 00000000..eb585585 --- /dev/null +++ b/exercises/practice/crypto-square/.meta/solutions/t/crypto-square.rakutest @@ -0,0 +1 @@ +../../../t/crypto-square.rakutest \ No newline at end of file diff --git a/exercises/practice/crypto-square/CryptoSquare.rakumod b/exercises/practice/crypto-square/lib/CryptoSquare.rakumod similarity index 100% rename from exercises/practice/crypto-square/CryptoSquare.rakumod rename to exercises/practice/crypto-square/lib/CryptoSquare.rakumod diff --git a/exercises/practice/crypto-square/crypto-square.rakutest b/exercises/practice/crypto-square/t/crypto-square.rakutest similarity index 97% rename from exercises/practice/crypto-square/crypto-square.rakutest rename to exercises/practice/crypto-square/t/crypto-square.rakutest index 22ad8493..a1c6fb9f 100755 --- a/exercises/practice/crypto-square/crypto-square.rakutest +++ b/exercises/practice/crypto-square/t/crypto-square.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use CryptoSquare; cmp-ok( # begin: 407c3837-9aa7-4111-ab63-ec54b58e8e9f diff --git a/exercises/practice/darts/.meta/config.json b/exercises/practice/darts/.meta/config.json index 7169ded4..8a40ddb7 100644 --- a/exercises/practice/darts/.meta/config.json +++ b/exercises/practice/darts/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "Darts.rakumod" + "lib/Darts.rakumod" ], "test": [ - "darts.rakutest" + "t/darts.rakutest" ], "example": [ - ".meta/solutions/Darts.rakumod" + ".meta/solutions/lib/Darts.rakumod" ] }, "blurb": "Write a function that returns the earned points in a single toss of a Darts game.", diff --git a/exercises/practice/darts/.meta/solutions/darts.rakutest b/exercises/practice/darts/.meta/solutions/darts.rakutest deleted file mode 120000 index f658c716..00000000 --- a/exercises/practice/darts/.meta/solutions/darts.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../darts.rakutest \ No newline at end of file diff --git a/exercises/practice/darts/.meta/solutions/Darts.rakumod b/exercises/practice/darts/.meta/solutions/lib/Darts.rakumod similarity index 100% rename from exercises/practice/darts/.meta/solutions/Darts.rakumod rename to exercises/practice/darts/.meta/solutions/lib/Darts.rakumod diff --git a/exercises/practice/darts/.meta/solutions/t/darts.rakutest b/exercises/practice/darts/.meta/solutions/t/darts.rakutest new file mode 120000 index 00000000..e491151a --- /dev/null +++ b/exercises/practice/darts/.meta/solutions/t/darts.rakutest @@ -0,0 +1 @@ +../../../t/darts.rakutest \ No newline at end of file diff --git a/exercises/practice/darts/Darts.rakumod b/exercises/practice/darts/lib/Darts.rakumod similarity index 100% rename from exercises/practice/darts/Darts.rakumod rename to exercises/practice/darts/lib/Darts.rakumod diff --git a/exercises/practice/darts/darts.rakutest b/exercises/practice/darts/t/darts.rakutest similarity index 98% rename from exercises/practice/darts/darts.rakutest rename to exercises/practice/darts/t/darts.rakutest index f79264e4..dfe00e21 100755 --- a/exercises/practice/darts/darts.rakutest +++ b/exercises/practice/darts/t/darts.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Darts; cmp-ok( # begin: 9033f731-0a3a-4d9c-b1c0-34a1c8362afb diff --git a/exercises/practice/diamond/.meta/config.json b/exercises/practice/diamond/.meta/config.json index c3511c47..1543b059 100644 --- a/exercises/practice/diamond/.meta/config.json +++ b/exercises/practice/diamond/.meta/config.json @@ -3,13 +3,13 @@ "contributors": ["util"], "files": { "solution": [ - "Diamond.rakumod" + "lib/Diamond.rakumod" ], "test": [ - "diamond.rakutest" + "t/diamond.rakutest" ], "example": [ - ".meta/solutions/Diamond.rakumod" + ".meta/solutions/lib/Diamond.rakumod" ] }, "blurb": "Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.", diff --git a/exercises/practice/diamond/.meta/solutions/diamond.rakutest b/exercises/practice/diamond/.meta/solutions/diamond.rakutest deleted file mode 120000 index 40a058f8..00000000 --- a/exercises/practice/diamond/.meta/solutions/diamond.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../diamond.rakutest \ No newline at end of file diff --git a/exercises/practice/diamond/.meta/solutions/Diamond.rakumod b/exercises/practice/diamond/.meta/solutions/lib/Diamond.rakumod similarity index 100% rename from exercises/practice/diamond/.meta/solutions/Diamond.rakumod rename to exercises/practice/diamond/.meta/solutions/lib/Diamond.rakumod diff --git a/exercises/practice/diamond/.meta/solutions/t/diamond.rakutest b/exercises/practice/diamond/.meta/solutions/t/diamond.rakutest new file mode 120000 index 00000000..e1998c00 --- /dev/null +++ b/exercises/practice/diamond/.meta/solutions/t/diamond.rakutest @@ -0,0 +1 @@ +../../../t/diamond.rakutest \ No newline at end of file diff --git a/exercises/practice/diamond/Diamond.rakumod b/exercises/practice/diamond/lib/Diamond.rakumod similarity index 100% rename from exercises/practice/diamond/Diamond.rakumod rename to exercises/practice/diamond/lib/Diamond.rakumod diff --git a/exercises/practice/diamond/diamond.rakutest b/exercises/practice/diamond/t/diamond.rakutest similarity index 99% rename from exercises/practice/diamond/diamond.rakutest rename to exercises/practice/diamond/t/diamond.rakutest index c0803e69..7bf6907c 100755 --- a/exercises/practice/diamond/diamond.rakutest +++ b/exercises/practice/diamond/t/diamond.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Diamond; is( # begin: 202fb4cc-6a38-4883-9193-a29d5cb92076 diff --git a/exercises/practice/difference-of-squares/.meta/config.json b/exercises/practice/difference-of-squares/.meta/config.json index 16ec21da..6d18e687 100644 --- a/exercises/practice/difference-of-squares/.meta/config.json +++ b/exercises/practice/difference-of-squares/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "DifferenceOfSquares.rakumod" + "lib/DifferenceOfSquares.rakumod" ], "test": [ - "difference-of-squares.rakutest" + "t/difference-of-squares.rakutest" ], "example": [ - ".meta/solutions/DifferenceOfSquares.rakumod" + ".meta/solutions/lib/DifferenceOfSquares.rakumod" ] }, "blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.", diff --git a/exercises/practice/difference-of-squares/.meta/solutions/difference-of-squares.rakutest b/exercises/practice/difference-of-squares/.meta/solutions/difference-of-squares.rakutest deleted file mode 120000 index 25aaa4c6..00000000 --- a/exercises/practice/difference-of-squares/.meta/solutions/difference-of-squares.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../difference-of-squares.rakutest \ No newline at end of file diff --git a/exercises/practice/difference-of-squares/.meta/solutions/DifferenceOfSquares.rakumod b/exercises/practice/difference-of-squares/.meta/solutions/lib/DifferenceOfSquares.rakumod similarity index 100% rename from exercises/practice/difference-of-squares/.meta/solutions/DifferenceOfSquares.rakumod rename to exercises/practice/difference-of-squares/.meta/solutions/lib/DifferenceOfSquares.rakumod diff --git a/exercises/practice/difference-of-squares/.meta/solutions/t/difference-of-squares.rakutest b/exercises/practice/difference-of-squares/.meta/solutions/t/difference-of-squares.rakutest new file mode 120000 index 00000000..8492a0af --- /dev/null +++ b/exercises/practice/difference-of-squares/.meta/solutions/t/difference-of-squares.rakutest @@ -0,0 +1 @@ +../../../t/difference-of-squares.rakutest \ No newline at end of file diff --git a/exercises/practice/difference-of-squares/DifferenceOfSquares.rakumod b/exercises/practice/difference-of-squares/lib/DifferenceOfSquares.rakumod similarity index 100% rename from exercises/practice/difference-of-squares/DifferenceOfSquares.rakumod rename to exercises/practice/difference-of-squares/lib/DifferenceOfSquares.rakumod diff --git a/exercises/practice/difference-of-squares/difference-of-squares.rakutest b/exercises/practice/difference-of-squares/t/difference-of-squares.rakutest similarity index 98% rename from exercises/practice/difference-of-squares/difference-of-squares.rakutest rename to exercises/practice/difference-of-squares/t/difference-of-squares.rakutest index 38a23c2d..e625a0bd 100755 --- a/exercises/practice/difference-of-squares/difference-of-squares.rakutest +++ b/exercises/practice/difference-of-squares/t/difference-of-squares.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use DifferenceOfSquares; cmp-ok( # begin: e46c542b-31fc-4506-bcae-6b62b3268537 diff --git a/exercises/practice/etl/.meta/config.json b/exercises/practice/etl/.meta/config.json index ca384fb0..ed70dd3a 100644 --- a/exercises/practice/etl/.meta/config.json +++ b/exercises/practice/etl/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "ETL.rakumod" + "lib/ETL.rakumod" ], "test": [ - "etl.rakutest" + "t/etl.rakutest" ], "example": [ - ".meta/solutions/ETL.rakumod" + ".meta/solutions/lib/ETL.rakumod" ] }, "blurb": "Change the data format for scoring a game to more easily add other languages.", diff --git a/exercises/practice/etl/.meta/solutions/etl.rakutest b/exercises/practice/etl/.meta/solutions/etl.rakutest deleted file mode 120000 index a96ff6ee..00000000 --- a/exercises/practice/etl/.meta/solutions/etl.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../etl.rakutest \ No newline at end of file diff --git a/exercises/practice/etl/.meta/solutions/ETL.rakumod b/exercises/practice/etl/.meta/solutions/lib/ETL.rakumod similarity index 100% rename from exercises/practice/etl/.meta/solutions/ETL.rakumod rename to exercises/practice/etl/.meta/solutions/lib/ETL.rakumod diff --git a/exercises/practice/etl/.meta/solutions/t/etl.rakutest b/exercises/practice/etl/.meta/solutions/t/etl.rakutest new file mode 120000 index 00000000..d57239de --- /dev/null +++ b/exercises/practice/etl/.meta/solutions/t/etl.rakutest @@ -0,0 +1 @@ +../../../t/etl.rakutest \ No newline at end of file diff --git a/exercises/practice/etl/ETL.rakumod b/exercises/practice/etl/lib/ETL.rakumod similarity index 100% rename from exercises/practice/etl/ETL.rakumod rename to exercises/practice/etl/lib/ETL.rakumod diff --git a/exercises/practice/etl/etl.rakutest b/exercises/practice/etl/t/etl.rakutest similarity index 97% rename from exercises/practice/etl/etl.rakutest rename to exercises/practice/etl/t/etl.rakutest index 6048cb95..591df9bb 100755 --- a/exercises/practice/etl/etl.rakutest +++ b/exercises/practice/etl/t/etl.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ETL; =head2 Notes diff --git a/exercises/practice/flatten-array/.meta/config.json b/exercises/practice/flatten-array/.meta/config.json index 88a9c09a..6f3b2399 100644 --- a/exercises/practice/flatten-array/.meta/config.json +++ b/exercises/practice/flatten-array/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "FlattenArray.rakumod" + "lib/FlattenArray.rakumod" ], "test": [ - "flatten-array.rakutest" + "t/flatten-array.rakutest" ], "example": [ - ".meta/solutions/FlattenArray.rakumod" + ".meta/solutions/lib/FlattenArray.rakumod" ] }, "blurb": "Take a nested list and return a single list with all values except nil/null.", diff --git a/exercises/practice/flatten-array/.meta/solutions/flatten-array.rakutest b/exercises/practice/flatten-array/.meta/solutions/flatten-array.rakutest deleted file mode 120000 index c3b2d601..00000000 --- a/exercises/practice/flatten-array/.meta/solutions/flatten-array.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../flatten-array.rakutest \ No newline at end of file diff --git a/exercises/practice/flatten-array/.meta/solutions/FlattenArray.rakumod b/exercises/practice/flatten-array/.meta/solutions/lib/FlattenArray.rakumod similarity index 100% rename from exercises/practice/flatten-array/.meta/solutions/FlattenArray.rakumod rename to exercises/practice/flatten-array/.meta/solutions/lib/FlattenArray.rakumod diff --git a/exercises/practice/flatten-array/.meta/solutions/t/flatten-array.rakutest b/exercises/practice/flatten-array/.meta/solutions/t/flatten-array.rakutest new file mode 120000 index 00000000..a5e6946e --- /dev/null +++ b/exercises/practice/flatten-array/.meta/solutions/t/flatten-array.rakutest @@ -0,0 +1 @@ +../../../t/flatten-array.rakutest \ No newline at end of file diff --git a/exercises/practice/flatten-array/FlattenArray.rakumod b/exercises/practice/flatten-array/lib/FlattenArray.rakumod similarity index 100% rename from exercises/practice/flatten-array/FlattenArray.rakumod rename to exercises/practice/flatten-array/lib/FlattenArray.rakumod diff --git a/exercises/practice/flatten-array/flatten-array.rakutest b/exercises/practice/flatten-array/t/flatten-array.rakutest similarity index 98% rename from exercises/practice/flatten-array/flatten-array.rakutest rename to exercises/practice/flatten-array/t/flatten-array.rakutest index 295b831e..20763738 100755 --- a/exercises/practice/flatten-array/flatten-array.rakutest +++ b/exercises/practice/flatten-array/t/flatten-array.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use FlattenArray; cmp-ok( # begin: 8c71dabd-da60-422d-a290-4a571471fb14 diff --git a/exercises/practice/gigasecond/.meta/config.json b/exercises/practice/gigasecond/.meta/config.json index 153011e2..bb2ffed2 100644 --- a/exercises/practice/gigasecond/.meta/config.json +++ b/exercises/practice/gigasecond/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "Gigasecond.rakumod" + "lib/Gigasecond.rakumod" ], "test": [ - "gigasecond.rakutest" + "t/gigasecond.rakutest" ], "example": [ - ".meta/solutions/Gigasecond.rakumod" + ".meta/solutions/lib/Gigasecond.rakumod" ] }, "blurb": "Given a moment, determine the moment that would be after a gigasecond has passed.", diff --git a/exercises/practice/gigasecond/.meta/solutions/gigasecond.rakutest b/exercises/practice/gigasecond/.meta/solutions/gigasecond.rakutest deleted file mode 120000 index 59e730cb..00000000 --- a/exercises/practice/gigasecond/.meta/solutions/gigasecond.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../gigasecond.rakutest \ No newline at end of file diff --git a/exercises/practice/gigasecond/.meta/solutions/Gigasecond.rakumod b/exercises/practice/gigasecond/.meta/solutions/lib/Gigasecond.rakumod similarity index 86% rename from exercises/practice/gigasecond/.meta/solutions/Gigasecond.rakumod rename to exercises/practice/gigasecond/.meta/solutions/lib/Gigasecond.rakumod index f78804c5..9c0cf2ab 100644 --- a/exercises/practice/gigasecond/.meta/solutions/Gigasecond.rakumod +++ b/exercises/practice/gigasecond/.meta/solutions/lib/Gigasecond.rakumod @@ -1,3 +1,5 @@ +unit module Gigasecond; + sub giga-later ( $date --> DateTime() ) is export { $date.later: < seconds minutes hours days > Z=> 10⁹.polymod: < 60 60 24 > diff --git a/exercises/practice/gigasecond/.meta/solutions/t/gigasecond.rakutest b/exercises/practice/gigasecond/.meta/solutions/t/gigasecond.rakutest new file mode 120000 index 00000000..5af0fa6a --- /dev/null +++ b/exercises/practice/gigasecond/.meta/solutions/t/gigasecond.rakutest @@ -0,0 +1 @@ +../../../t/gigasecond.rakutest \ No newline at end of file diff --git a/exercises/practice/gigasecond/Gigasecond.rakumod b/exercises/practice/gigasecond/lib/Gigasecond.rakumod similarity index 59% rename from exercises/practice/gigasecond/Gigasecond.rakumod rename to exercises/practice/gigasecond/lib/Gigasecond.rakumod index fb8efa45..1b8ee0bb 100644 --- a/exercises/practice/gigasecond/Gigasecond.rakumod +++ b/exercises/practice/gigasecond/lib/Gigasecond.rakumod @@ -1,2 +1,4 @@ +unit module Gigasecond; + sub giga-later ($date) is export { } diff --git a/exercises/practice/gigasecond/gigasecond.rakutest b/exercises/practice/gigasecond/t/gigasecond.rakutest similarity index 97% rename from exercises/practice/gigasecond/gigasecond.rakutest rename to exercises/practice/gigasecond/t/gigasecond.rakutest index 4fc91f86..cb373083 100755 --- a/exercises/practice/gigasecond/gigasecond.rakutest +++ b/exercises/practice/gigasecond/t/gigasecond.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Gigasecond; cmp-ok( # begin: 92fbe71c-ea52-4fac-bd77-be38023cacf7 diff --git a/exercises/practice/grade-school/.meta/config.json b/exercises/practice/grade-school/.meta/config.json index 7f100e3a..d7e926c9 100644 --- a/exercises/practice/grade-school/.meta/config.json +++ b/exercises/practice/grade-school/.meta/config.json @@ -6,13 +6,13 @@ ], "files": { "solution": [ - "GradeSchool.rakumod" + "lib/GradeSchool.rakumod" ], "test": [ - "grade-school.rakutest" + "t/grade-school.rakutest" ], "example": [ - ".meta/solutions/GradeSchool.rakumod" + ".meta/solutions/lib/GradeSchool.rakumod" ] }, "blurb": "Given students' names along with the grade that they are in, create a roster for the school.", diff --git a/exercises/practice/grade-school/.meta/solutions/grade-school.rakutest b/exercises/practice/grade-school/.meta/solutions/grade-school.rakutest deleted file mode 120000 index 5eb63ed3..00000000 --- a/exercises/practice/grade-school/.meta/solutions/grade-school.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../grade-school.rakutest \ No newline at end of file diff --git a/exercises/practice/grade-school/.meta/solutions/GradeSchool.rakumod b/exercises/practice/grade-school/.meta/solutions/lib/GradeSchool.rakumod similarity index 100% rename from exercises/practice/grade-school/.meta/solutions/GradeSchool.rakumod rename to exercises/practice/grade-school/.meta/solutions/lib/GradeSchool.rakumod diff --git a/exercises/practice/grade-school/.meta/solutions/t/grade-school.rakutest b/exercises/practice/grade-school/.meta/solutions/t/grade-school.rakutest new file mode 120000 index 00000000..20d9dcfb --- /dev/null +++ b/exercises/practice/grade-school/.meta/solutions/t/grade-school.rakutest @@ -0,0 +1 @@ +../../../t/grade-school.rakutest \ No newline at end of file diff --git a/exercises/practice/grade-school/GradeSchool.rakumod b/exercises/practice/grade-school/lib/GradeSchool.rakumod similarity index 100% rename from exercises/practice/grade-school/GradeSchool.rakumod rename to exercises/practice/grade-school/lib/GradeSchool.rakumod diff --git a/exercises/practice/grade-school/grade-school.rakutest b/exercises/practice/grade-school/t/grade-school.rakutest similarity index 99% rename from exercises/practice/grade-school/grade-school.rakutest rename to exercises/practice/grade-school/t/grade-school.rakutest index 664f229a..2e5d3a92 100755 --- a/exercises/practice/grade-school/grade-school.rakutest +++ b/exercises/practice/grade-school/t/grade-school.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use GradeSchool; my GradeSchool $grade-school; diff --git a/exercises/practice/grains/.meta/config.json b/exercises/practice/grains/.meta/config.json index ca260eda..fa5c4394 100644 --- a/exercises/practice/grains/.meta/config.json +++ b/exercises/practice/grains/.meta/config.json @@ -9,13 +9,13 @@ ], "files": { "solution": [ - "Grains.rakumod" + "lib/Grains.rakumod" ], "test": [ - "grains.rakutest" + "t/grains.rakutest" ], "example": [ - ".meta/solutions/Grains.rakumod" + ".meta/solutions/lib/Grains.rakumod" ] }, "blurb": "Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.", diff --git a/exercises/practice/grains/.meta/solutions/grains.rakutest b/exercises/practice/grains/.meta/solutions/grains.rakutest deleted file mode 120000 index d4fdcb73..00000000 --- a/exercises/practice/grains/.meta/solutions/grains.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../grains.rakutest \ No newline at end of file diff --git a/exercises/practice/grains/.meta/solutions/Grains.rakumod b/exercises/practice/grains/.meta/solutions/lib/Grains.rakumod similarity index 100% rename from exercises/practice/grains/.meta/solutions/Grains.rakumod rename to exercises/practice/grains/.meta/solutions/lib/Grains.rakumod diff --git a/exercises/practice/grains/.meta/solutions/t/grains.rakutest b/exercises/practice/grains/.meta/solutions/t/grains.rakutest new file mode 120000 index 00000000..93e735a3 --- /dev/null +++ b/exercises/practice/grains/.meta/solutions/t/grains.rakutest @@ -0,0 +1 @@ +../../../t/grains.rakutest \ No newline at end of file diff --git a/exercises/practice/grains/Grains.rakumod b/exercises/practice/grains/lib/Grains.rakumod similarity index 100% rename from exercises/practice/grains/Grains.rakumod rename to exercises/practice/grains/lib/Grains.rakumod diff --git a/exercises/practice/grains/grains.rakutest b/exercises/practice/grains/t/grains.rakutest similarity index 94% rename from exercises/practice/grains/grains.rakutest rename to exercises/practice/grains/t/grains.rakutest index f2a0cecb..f6c1d332 100755 --- a/exercises/practice/grains/grains.rakutest +++ b/exercises/practice/grains/t/grains.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Grains; cmp-ok( # begin: 9fbde8de-36b2-49de-baf2-cd42d6f28405 @@ -59,7 +59,7 @@ throws-like( # begin: 1d47d832-3e85-4974-9466-5bd35af484e3 "square must be between 1 and 64" || "type check failed" /, - "returns the number of grains on the square: square 0 raises an exception", + "returns the number of grains on the square: square 0 is invalid", ); # end: 1d47d832-3e85-4974-9466-5bd35af484e3 throws-like( # begin: 61974483-eeb2-465e-be54-ca5dde366453 @@ -69,7 +69,7 @@ throws-like( # begin: 61974483-eeb2-465e-be54-ca5dde366453 "square must be between 1 and 64" || "type check failed" /, - "returns the number of grains on the square: negative square raises an exception", + "returns the number of grains on the square: negative square is invalid", ); # end: 61974483-eeb2-465e-be54-ca5dde366453 throws-like( # begin: a95e4374-f32c-45a7-a10d-ffec475c012f @@ -79,7 +79,7 @@ throws-like( # begin: a95e4374-f32c-45a7-a10d-ffec475c012f "square must be between 1 and 64" || "type check failed" /, - "returns the number of grains on the square: square greater than 64 raises an exception", + "returns the number of grains on the square: square greater than 64 is invalid", ); # end: a95e4374-f32c-45a7-a10d-ffec475c012f cmp-ok( # begin: 6eb07385-3659-4b45-a6be-9dc474222750 diff --git a/exercises/practice/hamming/.meta/config.json b/exercises/practice/hamming/.meta/config.json index 6d3bec9e..58ecab62 100644 --- a/exercises/practice/hamming/.meta/config.json +++ b/exercises/practice/hamming/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Hamming.rakumod" + "lib/Hamming.rakumod" ], "test": [ - "hamming.rakutest" + "t/hamming.rakutest" ], "example": [ - ".meta/solutions/Hamming.rakumod" + ".meta/solutions/lib/Hamming.rakumod" ] }, "blurb": "Calculate the Hamming difference between two DNA strands.", diff --git a/exercises/practice/hamming/.meta/solutions/hamming.rakutest b/exercises/practice/hamming/.meta/solutions/hamming.rakutest deleted file mode 120000 index 98e96ddc..00000000 --- a/exercises/practice/hamming/.meta/solutions/hamming.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../hamming.rakutest \ No newline at end of file diff --git a/exercises/practice/hamming/.meta/solutions/Hamming.rakumod b/exercises/practice/hamming/.meta/solutions/lib/Hamming.rakumod similarity index 100% rename from exercises/practice/hamming/.meta/solutions/Hamming.rakumod rename to exercises/practice/hamming/.meta/solutions/lib/Hamming.rakumod diff --git a/exercises/practice/hamming/.meta/solutions/t/hamming.rakutest b/exercises/practice/hamming/.meta/solutions/t/hamming.rakutest new file mode 120000 index 00000000..7a5c3f8e --- /dev/null +++ b/exercises/practice/hamming/.meta/solutions/t/hamming.rakutest @@ -0,0 +1 @@ +../../../t/hamming.rakutest \ No newline at end of file diff --git a/exercises/practice/hamming/Hamming.rakumod b/exercises/practice/hamming/lib/Hamming.rakumod similarity index 100% rename from exercises/practice/hamming/Hamming.rakumod rename to exercises/practice/hamming/lib/Hamming.rakumod diff --git a/exercises/practice/hamming/hamming.rakutest b/exercises/practice/hamming/t/hamming.rakutest similarity index 98% rename from exercises/practice/hamming/hamming.rakutest rename to exercises/practice/hamming/t/hamming.rakutest index 82190cb2..3ed49a98 100755 --- a/exercises/practice/hamming/hamming.rakutest +++ b/exercises/practice/hamming/t/hamming.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Hamming; cmp-ok( # begin: f6dcb64f-03b0-4b60-81b1-3c9dbf47e887 diff --git a/exercises/practice/hello-world/.meta/config.json b/exercises/practice/hello-world/.meta/config.json index a73e0817..7192a308 100644 --- a/exercises/practice/hello-world/.meta/config.json +++ b/exercises/practice/hello-world/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "HelloWorld.rakumod" + "lib/HelloWorld.rakumod" ], "test": [ - "hello-world.rakutest" + "t/hello-world.rakutest" ], "example": [ - ".meta/solutions/HelloWorld.rakumod" + ".meta/solutions/lib/HelloWorld.rakumod" ] }, "blurb": "The classical introductory exercise. Just say \"Hello, World!\".", diff --git a/exercises/practice/hello-world/.meta/solutions/hello-world.rakutest b/exercises/practice/hello-world/.meta/solutions/hello-world.rakutest deleted file mode 120000 index 3346c817..00000000 --- a/exercises/practice/hello-world/.meta/solutions/hello-world.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../hello-world.rakutest \ No newline at end of file diff --git a/exercises/practice/hello-world/.meta/solutions/HelloWorld.rakumod b/exercises/practice/hello-world/.meta/solutions/lib/HelloWorld.rakumod similarity index 100% rename from exercises/practice/hello-world/.meta/solutions/HelloWorld.rakumod rename to exercises/practice/hello-world/.meta/solutions/lib/HelloWorld.rakumod diff --git a/exercises/practice/hello-world/.meta/solutions/t/hello-world.rakutest b/exercises/practice/hello-world/.meta/solutions/t/hello-world.rakutest new file mode 120000 index 00000000..3868f5c6 --- /dev/null +++ b/exercises/practice/hello-world/.meta/solutions/t/hello-world.rakutest @@ -0,0 +1 @@ +../../../t/hello-world.rakutest \ No newline at end of file diff --git a/exercises/practice/hello-world/HelloWorld.rakumod b/exercises/practice/hello-world/lib/HelloWorld.rakumod similarity index 100% rename from exercises/practice/hello-world/HelloWorld.rakumod rename to exercises/practice/hello-world/lib/HelloWorld.rakumod diff --git a/exercises/practice/hello-world/hello-world.rakutest b/exercises/practice/hello-world/t/hello-world.rakutest similarity index 80% rename from exercises/practice/hello-world/hello-world.rakutest rename to exercises/practice/hello-world/t/hello-world.rakutest index c7eaf78c..1b76e017 100755 --- a/exercises/practice/hello-world/hello-world.rakutest +++ b/exercises/practice/hello-world/t/hello-world.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; #`[Look for the module inside the same directory as this test file.] +use lib $?FILE.IO.parent(2).add('lib'); #`[Look for the module inside the same directory as this test file.] use HelloWorld; cmp-ok( # begin: af9ffe10-dc13-42d8-a742-e7bdafac449d diff --git a/exercises/practice/house/.meta/config.json b/exercises/practice/house/.meta/config.json index b8ec54fe..84e1c6ed 100644 --- a/exercises/practice/house/.meta/config.json +++ b/exercises/practice/house/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "House.rakumod" + "lib/House.rakumod" ], "test": [ - "house.rakutest" + "t/house.rakutest" ], "example": [ - ".meta/solutions/House.rakumod" + ".meta/solutions/lib/House.rakumod" ] }, "blurb": "Output the nursery rhyme 'This is the House that Jack Built'.", diff --git a/exercises/practice/house/.meta/solutions/house.rakutest b/exercises/practice/house/.meta/solutions/house.rakutest deleted file mode 120000 index fdfc8bbf..00000000 --- a/exercises/practice/house/.meta/solutions/house.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../house.rakutest \ No newline at end of file diff --git a/exercises/practice/house/.meta/solutions/House.rakumod b/exercises/practice/house/.meta/solutions/lib/House.rakumod similarity index 100% rename from exercises/practice/house/.meta/solutions/House.rakumod rename to exercises/practice/house/.meta/solutions/lib/House.rakumod diff --git a/exercises/practice/house/.meta/solutions/t/house.rakutest b/exercises/practice/house/.meta/solutions/t/house.rakutest new file mode 120000 index 00000000..15d084b3 --- /dev/null +++ b/exercises/practice/house/.meta/solutions/t/house.rakutest @@ -0,0 +1 @@ +../../../t/house.rakutest \ No newline at end of file diff --git a/exercises/practice/house/House.rakumod b/exercises/practice/house/lib/House.rakumod similarity index 100% rename from exercises/practice/house/House.rakumod rename to exercises/practice/house/lib/House.rakumod diff --git a/exercises/practice/house/house.rakutest b/exercises/practice/house/t/house.rakutest similarity index 99% rename from exercises/practice/house/house.rakutest rename to exercises/practice/house/t/house.rakutest index 9ffa9bd8..968cb716 100755 --- a/exercises/practice/house/house.rakutest +++ b/exercises/practice/house/t/house.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use House; cmp-ok( # begin: 28a540ff-f765-4348-9d57-ae33f25f41f2 diff --git a/exercises/practice/isbn-verifier/.meta/config.json b/exercises/practice/isbn-verifier/.meta/config.json index b5b18b34..b17d9a10 100644 --- a/exercises/practice/isbn-verifier/.meta/config.json +++ b/exercises/practice/isbn-verifier/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "IsbnVerifier.rakumod" + "lib/IsbnVerifier.rakumod" ], "test": [ - "isbn-verifier.rakutest" + "t/isbn-verifier.rakutest" ], "example": [ - ".meta/solutions/IsbnVerifier.rakumod" + ".meta/solutions/lib/IsbnVerifier.rakumod" ] }, "blurb": "Check if a given string is a valid ISBN-10 number.", diff --git a/exercises/practice/isbn-verifier/.meta/solutions/isbn-verifier.rakutest b/exercises/practice/isbn-verifier/.meta/solutions/isbn-verifier.rakutest deleted file mode 120000 index 806f2730..00000000 --- a/exercises/practice/isbn-verifier/.meta/solutions/isbn-verifier.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../isbn-verifier.rakutest \ No newline at end of file diff --git a/exercises/practice/isbn-verifier/.meta/solutions/IsbnVerifier.rakumod b/exercises/practice/isbn-verifier/.meta/solutions/lib/IsbnVerifier.rakumod similarity index 100% rename from exercises/practice/isbn-verifier/.meta/solutions/IsbnVerifier.rakumod rename to exercises/practice/isbn-verifier/.meta/solutions/lib/IsbnVerifier.rakumod diff --git a/exercises/practice/isbn-verifier/.meta/solutions/t/isbn-verifier.rakutest b/exercises/practice/isbn-verifier/.meta/solutions/t/isbn-verifier.rakutest new file mode 120000 index 00000000..ac86bd53 --- /dev/null +++ b/exercises/practice/isbn-verifier/.meta/solutions/t/isbn-verifier.rakutest @@ -0,0 +1 @@ +../../../t/isbn-verifier.rakutest \ No newline at end of file diff --git a/exercises/practice/isbn-verifier/IsbnVerifier.rakumod b/exercises/practice/isbn-verifier/lib/IsbnVerifier.rakumod similarity index 100% rename from exercises/practice/isbn-verifier/IsbnVerifier.rakumod rename to exercises/practice/isbn-verifier/lib/IsbnVerifier.rakumod diff --git a/exercises/practice/isbn-verifier/isbn-verifier.rakutest b/exercises/practice/isbn-verifier/t/isbn-verifier.rakutest similarity index 98% rename from exercises/practice/isbn-verifier/isbn-verifier.rakutest rename to exercises/practice/isbn-verifier/t/isbn-verifier.rakutest index 3d0b6b57..c3007fc1 100755 --- a/exercises/practice/isbn-verifier/isbn-verifier.rakutest +++ b/exercises/practice/isbn-verifier/t/isbn-verifier.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use IsbnVerifier; cmp-ok( # begin: 0caa3eac-d2e3-4c29-8df8-b188bc8c9292 diff --git a/exercises/practice/isogram/.meta/config.json b/exercises/practice/isogram/.meta/config.json index 16ddd89a..958b750d 100644 --- a/exercises/practice/isogram/.meta/config.json +++ b/exercises/practice/isogram/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Isogram.rakumod" + "lib/Isogram.rakumod" ], "test": [ - "isogram.rakutest" + "t/isogram.rakutest" ], "example": [ - ".meta/solutions/Isogram.rakumod" + ".meta/solutions/lib/Isogram.rakumod" ] }, "blurb": "Determine if a word or phrase is an isogram.", diff --git a/exercises/practice/isogram/.meta/solutions/isogram.rakutest b/exercises/practice/isogram/.meta/solutions/isogram.rakutest deleted file mode 120000 index d22b135b..00000000 --- a/exercises/practice/isogram/.meta/solutions/isogram.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../isogram.rakutest \ No newline at end of file diff --git a/exercises/practice/isogram/.meta/solutions/Isogram.rakumod b/exercises/practice/isogram/.meta/solutions/lib/Isogram.rakumod similarity index 100% rename from exercises/practice/isogram/.meta/solutions/Isogram.rakumod rename to exercises/practice/isogram/.meta/solutions/lib/Isogram.rakumod diff --git a/exercises/practice/isogram/.meta/solutions/t/isogram.rakutest b/exercises/practice/isogram/.meta/solutions/t/isogram.rakutest new file mode 120000 index 00000000..1aeef47d --- /dev/null +++ b/exercises/practice/isogram/.meta/solutions/t/isogram.rakutest @@ -0,0 +1 @@ +../../../t/isogram.rakutest \ No newline at end of file diff --git a/exercises/practice/isogram/Isogram.rakumod b/exercises/practice/isogram/lib/Isogram.rakumod similarity index 100% rename from exercises/practice/isogram/Isogram.rakumod rename to exercises/practice/isogram/lib/Isogram.rakumod diff --git a/exercises/practice/isogram/isogram.rakutest b/exercises/practice/isogram/t/isogram.rakutest similarity index 98% rename from exercises/practice/isogram/isogram.rakutest rename to exercises/practice/isogram/t/isogram.rakutest index f42e176c..8e3d3af3 100755 --- a/exercises/practice/isogram/isogram.rakutest +++ b/exercises/practice/isogram/t/isogram.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Isogram; cmp-ok( # begin: a0e97d2d-669e-47c7-8134-518a1e2c4555 diff --git a/exercises/practice/killer-sudoku-helper/.meta/config.json b/exercises/practice/killer-sudoku-helper/.meta/config.json index 7ae48de0..bbe6f18d 100644 --- a/exercises/practice/killer-sudoku-helper/.meta/config.json +++ b/exercises/practice/killer-sudoku-helper/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "KillerSudokuHelper.rakumod" + "lib/KillerSudokuHelper.rakumod" ], "test": [ - "killer-sudoku-helper.rakutest" + "t/killer-sudoku-helper.rakutest" ], "example": [ - ".meta/solutions/KillerSudokuHelper.rakumod" + ".meta/solutions/lib/KillerSudokuHelper.rakumod" ] }, "blurb": "Write a tool that makes it easier to solve Killer Sudokus", diff --git a/exercises/practice/killer-sudoku-helper/.meta/solutions/killer-sudoku-helper.rakutest b/exercises/practice/killer-sudoku-helper/.meta/solutions/killer-sudoku-helper.rakutest deleted file mode 120000 index 9ad174bc..00000000 --- a/exercises/practice/killer-sudoku-helper/.meta/solutions/killer-sudoku-helper.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../killer-sudoku-helper.rakutest \ No newline at end of file diff --git a/exercises/practice/killer-sudoku-helper/.meta/solutions/KillerSudokuHelper.rakumod b/exercises/practice/killer-sudoku-helper/.meta/solutions/lib/KillerSudokuHelper.rakumod similarity index 100% rename from exercises/practice/killer-sudoku-helper/.meta/solutions/KillerSudokuHelper.rakumod rename to exercises/practice/killer-sudoku-helper/.meta/solutions/lib/KillerSudokuHelper.rakumod diff --git a/exercises/practice/killer-sudoku-helper/.meta/solutions/t/killer-sudoku-helper.rakutest b/exercises/practice/killer-sudoku-helper/.meta/solutions/t/killer-sudoku-helper.rakutest new file mode 120000 index 00000000..ace6d27c --- /dev/null +++ b/exercises/practice/killer-sudoku-helper/.meta/solutions/t/killer-sudoku-helper.rakutest @@ -0,0 +1 @@ +../../../t/killer-sudoku-helper.rakutest \ No newline at end of file diff --git a/exercises/practice/killer-sudoku-helper/KillerSudokuHelper.rakumod b/exercises/practice/killer-sudoku-helper/lib/KillerSudokuHelper.rakumod similarity index 100% rename from exercises/practice/killer-sudoku-helper/KillerSudokuHelper.rakumod rename to exercises/practice/killer-sudoku-helper/lib/KillerSudokuHelper.rakumod diff --git a/exercises/practice/killer-sudoku-helper/killer-sudoku-helper.rakutest b/exercises/practice/killer-sudoku-helper/t/killer-sudoku-helper.rakutest similarity index 98% rename from exercises/practice/killer-sudoku-helper/killer-sudoku-helper.rakutest rename to exercises/practice/killer-sudoku-helper/t/killer-sudoku-helper.rakutest index 0aea3225..08bf3fd7 100755 --- a/exercises/practice/killer-sudoku-helper/killer-sudoku-helper.rakutest +++ b/exercises/practice/killer-sudoku-helper/t/killer-sudoku-helper.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use KillerSudokuHelper; cmp-ok( # begin: 2aaa8f13-11b5-4054-b95c-a906e4d79fb6 diff --git a/exercises/practice/largest-series-product/.meta/config.json b/exercises/practice/largest-series-product/.meta/config.json index 4fd0f9f3..0e2f5748 100644 --- a/exercises/practice/largest-series-product/.meta/config.json +++ b/exercises/practice/largest-series-product/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "LargestSeriesProduct.rakumod" + "lib/LargestSeriesProduct.rakumod" ], "test": [ - "largest-series-product.rakutest" + "t/largest-series-product.rakutest" ], "example": [ - ".meta/solutions/LargestSeriesProduct.rakumod" + ".meta/solutions/lib/LargestSeriesProduct.rakumod" ] }, "blurb": "Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.", diff --git a/exercises/practice/largest-series-product/.meta/solutions/largest-series-product.rakutest b/exercises/practice/largest-series-product/.meta/solutions/largest-series-product.rakutest deleted file mode 120000 index 022b9ec9..00000000 --- a/exercises/practice/largest-series-product/.meta/solutions/largest-series-product.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../largest-series-product.rakutest \ No newline at end of file diff --git a/exercises/practice/largest-series-product/.meta/solutions/LargestSeriesProduct.rakumod b/exercises/practice/largest-series-product/.meta/solutions/lib/LargestSeriesProduct.rakumod similarity index 87% rename from exercises/practice/largest-series-product/.meta/solutions/LargestSeriesProduct.rakumod rename to exercises/practice/largest-series-product/.meta/solutions/lib/LargestSeriesProduct.rakumod index 12c55a59..09b6984d 100644 --- a/exercises/practice/largest-series-product/.meta/solutions/LargestSeriesProduct.rakumod +++ b/exercises/practice/largest-series-product/.meta/solutions/lib/LargestSeriesProduct.rakumod @@ -1,3 +1,5 @@ +unit module LargestSeriesProduct; + proto largest-product (|) is export {*} multi largest-product ( $n, 0 ) { 1 } multi largest-product ( $n, Int $span where 1 .. $n.chars ) { diff --git a/exercises/practice/largest-series-product/.meta/solutions/t/largest-series-product.rakutest b/exercises/practice/largest-series-product/.meta/solutions/t/largest-series-product.rakutest new file mode 120000 index 00000000..30f0f868 --- /dev/null +++ b/exercises/practice/largest-series-product/.meta/solutions/t/largest-series-product.rakutest @@ -0,0 +1 @@ +../../../t/largest-series-product.rakutest \ No newline at end of file diff --git a/exercises/practice/largest-series-product/LargestSeriesProduct.rakumod b/exercises/practice/largest-series-product/lib/LargestSeriesProduct.rakumod similarity index 59% rename from exercises/practice/largest-series-product/LargestSeriesProduct.rakumod rename to exercises/practice/largest-series-product/lib/LargestSeriesProduct.rakumod index dff856b7..c7ea3681 100644 --- a/exercises/practice/largest-series-product/LargestSeriesProduct.rakumod +++ b/exercises/practice/largest-series-product/lib/LargestSeriesProduct.rakumod @@ -1,2 +1,4 @@ +unit module LargestSeriesProduct; + sub largest-product ($number, $span) is export { } diff --git a/exercises/practice/largest-series-product/largest-series-product.rakutest b/exercises/practice/largest-series-product/t/largest-series-product.rakutest similarity index 98% rename from exercises/practice/largest-series-product/largest-series-product.rakutest rename to exercises/practice/largest-series-product/t/largest-series-product.rakutest index 761b9d12..047acb18 100755 --- a/exercises/practice/largest-series-product/largest-series-product.rakutest +++ b/exercises/practice/largest-series-product/t/largest-series-product.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use LargestSeriesProduct; cmp-ok( # begin: 7c82f8b7-e347-48ee-8a22-f672323324d4 diff --git a/exercises/practice/leap/.meta/config.json b/exercises/practice/leap/.meta/config.json index 46b98896..08e89982 100644 --- a/exercises/practice/leap/.meta/config.json +++ b/exercises/practice/leap/.meta/config.json @@ -12,13 +12,13 @@ ], "files": { "solution": [ - "Leap.rakumod" + "lib/Leap.rakumod" ], "test": [ - "leap.rakutest" + "t/leap.rakutest" ], "example": [ - ".meta/solutions/standard/Leap.rakumod" + ".meta/solutions/standard/lib/Leap.rakumod" ] }, "blurb": "Given a year, report if it is a leap year.", diff --git a/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest b/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest deleted file mode 100755 index c29c714c..00000000 --- a/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env raku -use Test; -use lib $?FILE.IO.dirname; -use Leap; - -plan 1; - -for Date, DateTime { - .^method_table.wrap: sub (|) { - pass 'Creating a Date(Time) object is not allowed for this exercise.'; - }; -} - -is-leap-year(2004); diff --git a/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest b/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest new file mode 120000 index 00000000..b6079b95 --- /dev/null +++ b/exercises/practice/leap/.meta/solutions/forbidden/leap.rakutest @@ -0,0 +1 @@ +../../../../t/leap.rakutest \ No newline at end of file diff --git a/exercises/practice/leap/.meta/solutions/forbidden/Leap.rakumod b/exercises/practice/leap/.meta/solutions/forbidden/lib/Leap.rakumod similarity index 100% rename from exercises/practice/leap/.meta/solutions/forbidden/Leap.rakumod rename to exercises/practice/leap/.meta/solutions/forbidden/lib/Leap.rakumod diff --git a/exercises/practice/leap/.meta/solutions/standard/leap.rakutest b/exercises/practice/leap/.meta/solutions/standard/leap.rakutest index fa6dc66b..b6079b95 120000 --- a/exercises/practice/leap/.meta/solutions/standard/leap.rakutest +++ b/exercises/practice/leap/.meta/solutions/standard/leap.rakutest @@ -1 +1 @@ -../../../leap.rakutest \ No newline at end of file +../../../../t/leap.rakutest \ No newline at end of file diff --git a/exercises/practice/leap/.meta/solutions/standard/Leap.rakumod b/exercises/practice/leap/.meta/solutions/standard/lib/Leap.rakumod similarity index 100% rename from exercises/practice/leap/.meta/solutions/standard/Leap.rakumod rename to exercises/practice/leap/.meta/solutions/standard/lib/Leap.rakumod diff --git a/exercises/practice/leap/Leap.rakumod b/exercises/practice/leap/lib/Leap.rakumod similarity index 100% rename from exercises/practice/leap/Leap.rakumod rename to exercises/practice/leap/lib/Leap.rakumod diff --git a/exercises/practice/leap/leap.rakutest b/exercises/practice/leap/t/leap.rakutest similarity index 98% rename from exercises/practice/leap/leap.rakutest rename to exercises/practice/leap/t/leap.rakutest index 3407ba2f..2732e996 100755 --- a/exercises/practice/leap/leap.rakutest +++ b/exercises/practice/leap/t/leap.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Leap; for Date, DateTime { diff --git a/exercises/practice/linked-list/.meta/config.json b/exercises/practice/linked-list/.meta/config.json index 25cfe5cf..a246f4b6 100644 --- a/exercises/practice/linked-list/.meta/config.json +++ b/exercises/practice/linked-list/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "LinkedList.rakumod" + "lib/LinkedList.rakumod" ], "test": [ - "linked-list.rakutest" + "t/linked-list.rakutest" ], "example": [ - ".meta/solutions/LinkedList.rakumod" + ".meta/solutions/lib/LinkedList.rakumod" ] }, "blurb": "Implement a doubly linked list.", diff --git a/exercises/practice/linked-list/.meta/solutions/LinkedList.rakumod b/exercises/practice/linked-list/.meta/solutions/lib/LinkedList.rakumod similarity index 100% rename from exercises/practice/linked-list/.meta/solutions/LinkedList.rakumod rename to exercises/practice/linked-list/.meta/solutions/lib/LinkedList.rakumod diff --git a/exercises/practice/linked-list/.meta/solutions/linked-list.rakutest b/exercises/practice/linked-list/.meta/solutions/linked-list.rakutest deleted file mode 120000 index 2a1fc24f..00000000 --- a/exercises/practice/linked-list/.meta/solutions/linked-list.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../linked-list.rakutest \ No newline at end of file diff --git a/exercises/practice/linked-list/.meta/solutions/t/linked-list.rakutest b/exercises/practice/linked-list/.meta/solutions/t/linked-list.rakutest new file mode 120000 index 00000000..d5d0d166 --- /dev/null +++ b/exercises/practice/linked-list/.meta/solutions/t/linked-list.rakutest @@ -0,0 +1 @@ +../../../t/linked-list.rakutest \ No newline at end of file diff --git a/exercises/practice/linked-list/LinkedList.rakumod b/exercises/practice/linked-list/lib/LinkedList.rakumod similarity index 100% rename from exercises/practice/linked-list/LinkedList.rakumod rename to exercises/practice/linked-list/lib/LinkedList.rakumod diff --git a/exercises/practice/linked-list/linked-list.rakutest b/exercises/practice/linked-list/t/linked-list.rakutest similarity index 99% rename from exercises/practice/linked-list/linked-list.rakutest rename to exercises/practice/linked-list/t/linked-list.rakutest index 0b9ebe71..ea7e2d9d 100755 --- a/exercises/practice/linked-list/linked-list.rakutest +++ b/exercises/practice/linked-list/t/linked-list.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use LinkedList; subtest "pop gets element from the list" => { # begin: 7f7e3987-b954-41b8-8084-99beca08752c diff --git a/exercises/practice/luhn/.meta/config.json b/exercises/practice/luhn/.meta/config.json index 0326c6cb..90f035d1 100644 --- a/exercises/practice/luhn/.meta/config.json +++ b/exercises/practice/luhn/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "Luhn.rakumod" + "lib/Luhn.rakumod" ], "test": [ - "luhn.rakutest" + "t/luhn.rakutest" ], "example": [ - ".meta/solutions/Luhn.rakumod" + ".meta/solutions/lib/Luhn.rakumod" ] }, "blurb": "Given a number determine whether or not it is valid per the Luhn formula.", diff --git a/exercises/practice/luhn/.meta/solutions/Luhn.rakumod b/exercises/practice/luhn/.meta/solutions/lib/Luhn.rakumod similarity index 100% rename from exercises/practice/luhn/.meta/solutions/Luhn.rakumod rename to exercises/practice/luhn/.meta/solutions/lib/Luhn.rakumod diff --git a/exercises/practice/luhn/.meta/solutions/luhn.rakutest b/exercises/practice/luhn/.meta/solutions/luhn.rakutest deleted file mode 120000 index 9c26681f..00000000 --- a/exercises/practice/luhn/.meta/solutions/luhn.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../luhn.rakutest \ No newline at end of file diff --git a/exercises/practice/luhn/.meta/solutions/t/luhn.rakutest b/exercises/practice/luhn/.meta/solutions/t/luhn.rakutest new file mode 120000 index 00000000..f71a445f --- /dev/null +++ b/exercises/practice/luhn/.meta/solutions/t/luhn.rakutest @@ -0,0 +1 @@ +../../../t/luhn.rakutest \ No newline at end of file diff --git a/exercises/practice/luhn/Luhn.rakumod b/exercises/practice/luhn/lib/Luhn.rakumod similarity index 100% rename from exercises/practice/luhn/Luhn.rakumod rename to exercises/practice/luhn/lib/Luhn.rakumod diff --git a/exercises/practice/luhn/luhn.rakutest b/exercises/practice/luhn/t/luhn.rakutest similarity index 99% rename from exercises/practice/luhn/luhn.rakutest rename to exercises/practice/luhn/t/luhn.rakutest index c9a2a139..817f41be 100755 --- a/exercises/practice/luhn/luhn.rakutest +++ b/exercises/practice/luhn/t/luhn.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Luhn; cmp-ok( # begin: 792a7082-feb7-48c7-b88b-bbfec160865e diff --git a/exercises/practice/matching-brackets/.meta/config.json b/exercises/practice/matching-brackets/.meta/config.json index 4a1c0fc8..c148c6d2 100644 --- a/exercises/practice/matching-brackets/.meta/config.json +++ b/exercises/practice/matching-brackets/.meta/config.json @@ -5,13 +5,13 @@ ], "files": { "solution": [ - "MatchingBrackets.rakumod" + "lib/MatchingBrackets.rakumod" ], "test": [ - "matching-brackets.rakutest" + "t/matching-brackets.rakutest" ], "example": [ - ".meta/solutions/MatchingBrackets.rakumod" + ".meta/solutions/lib/MatchingBrackets.rakumod" ] }, "blurb": "Make sure the brackets and braces all match.", diff --git a/exercises/practice/matching-brackets/.meta/solutions/MatchingBrackets.rakumod b/exercises/practice/matching-brackets/.meta/solutions/lib/MatchingBrackets.rakumod similarity index 100% rename from exercises/practice/matching-brackets/.meta/solutions/MatchingBrackets.rakumod rename to exercises/practice/matching-brackets/.meta/solutions/lib/MatchingBrackets.rakumod diff --git a/exercises/practice/matching-brackets/.meta/solutions/matching-brackets.rakutest b/exercises/practice/matching-brackets/.meta/solutions/matching-brackets.rakutest deleted file mode 120000 index c568189f..00000000 --- a/exercises/practice/matching-brackets/.meta/solutions/matching-brackets.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../matching-brackets.rakutest \ No newline at end of file diff --git a/exercises/practice/matching-brackets/.meta/solutions/t/matching-brackets.rakutest b/exercises/practice/matching-brackets/.meta/solutions/t/matching-brackets.rakutest new file mode 120000 index 00000000..6a69bf50 --- /dev/null +++ b/exercises/practice/matching-brackets/.meta/solutions/t/matching-brackets.rakutest @@ -0,0 +1 @@ +../../../t/matching-brackets.rakutest \ No newline at end of file diff --git a/exercises/practice/matching-brackets/MatchingBrackets.rakumod b/exercises/practice/matching-brackets/lib/MatchingBrackets.rakumod similarity index 100% rename from exercises/practice/matching-brackets/MatchingBrackets.rakumod rename to exercises/practice/matching-brackets/lib/MatchingBrackets.rakumod diff --git a/exercises/practice/matching-brackets/matching-brackets.rakutest b/exercises/practice/matching-brackets/t/matching-brackets.rakutest similarity index 99% rename from exercises/practice/matching-brackets/matching-brackets.rakutest rename to exercises/practice/matching-brackets/t/matching-brackets.rakutest index cf43acb8..3b12dbeb 100755 --- a/exercises/practice/matching-brackets/matching-brackets.rakutest +++ b/exercises/practice/matching-brackets/t/matching-brackets.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use MatchingBrackets; cmp-ok( # begin: 81ec11da-38dd-442a-bcf9-3de7754609a5 diff --git a/exercises/practice/matrix/.meta/config.json b/exercises/practice/matrix/.meta/config.json index d9e2d3bf..44a69bf8 100644 --- a/exercises/practice/matrix/.meta/config.json +++ b/exercises/practice/matrix/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Matrix.rakumod" + "lib/Matrix.rakumod" ], "test": [ - "matrix.rakutest" + "t/matrix.rakutest" ], "example": [ - ".meta/solutions/Matrix.rakumod" + ".meta/solutions/lib/Matrix.rakumod" ] }, "blurb": "Given a string representing a matrix of numbers, return the rows and columns of that matrix.", diff --git a/exercises/practice/matrix/.meta/solutions/Matrix.rakumod b/exercises/practice/matrix/.meta/solutions/lib/Matrix.rakumod similarity index 100% rename from exercises/practice/matrix/.meta/solutions/Matrix.rakumod rename to exercises/practice/matrix/.meta/solutions/lib/Matrix.rakumod diff --git a/exercises/practice/matrix/.meta/solutions/matrix.rakutest b/exercises/practice/matrix/.meta/solutions/matrix.rakutest deleted file mode 120000 index bf3e3f25..00000000 --- a/exercises/practice/matrix/.meta/solutions/matrix.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../matrix.rakutest \ No newline at end of file diff --git a/exercises/practice/matrix/.meta/solutions/t/matrix.rakutest b/exercises/practice/matrix/.meta/solutions/t/matrix.rakutest new file mode 120000 index 00000000..3884fe15 --- /dev/null +++ b/exercises/practice/matrix/.meta/solutions/t/matrix.rakutest @@ -0,0 +1 @@ +../../../t/matrix.rakutest \ No newline at end of file diff --git a/exercises/practice/matrix/Matrix.rakumod b/exercises/practice/matrix/lib/Matrix.rakumod similarity index 100% rename from exercises/practice/matrix/Matrix.rakumod rename to exercises/practice/matrix/lib/Matrix.rakumod diff --git a/exercises/practice/matrix/matrix.rakutest b/exercises/practice/matrix/t/matrix.rakutest similarity index 97% rename from exercises/practice/matrix/matrix.rakutest rename to exercises/practice/matrix/t/matrix.rakutest index f5f71ca0..ff239111 100755 --- a/exercises/practice/matrix/matrix.rakutest +++ b/exercises/practice/matrix/t/matrix.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Matrix; cmp-ok( # begin: ca733dab-9d85-4065-9ef6-a880a951dafd diff --git a/exercises/practice/meetup/.meta/config.json b/exercises/practice/meetup/.meta/config.json index 09f2ce0e..4d1687ed 100644 --- a/exercises/practice/meetup/.meta/config.json +++ b/exercises/practice/meetup/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Meetup.rakumod" + "lib/Meetup.rakumod" ], "test": [ - "meetup.rakutest" + "t/meetup.rakutest" ], "example": [ - ".meta/solutions/Meetup.rakumod" + ".meta/solutions/lib/Meetup.rakumod" ] }, "blurb": "Calculate the date of meetups.", diff --git a/exercises/practice/meetup/.meta/solutions/Meetup.rakumod b/exercises/practice/meetup/.meta/solutions/lib/Meetup.rakumod similarity index 100% rename from exercises/practice/meetup/.meta/solutions/Meetup.rakumod rename to exercises/practice/meetup/.meta/solutions/lib/Meetup.rakumod diff --git a/exercises/practice/meetup/.meta/solutions/meetup.rakutest b/exercises/practice/meetup/.meta/solutions/meetup.rakutest deleted file mode 120000 index 33d06571..00000000 --- a/exercises/practice/meetup/.meta/solutions/meetup.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../meetup.rakutest \ No newline at end of file diff --git a/exercises/practice/meetup/.meta/solutions/t/meetup.rakutest b/exercises/practice/meetup/.meta/solutions/t/meetup.rakutest new file mode 120000 index 00000000..c1d97dd4 --- /dev/null +++ b/exercises/practice/meetup/.meta/solutions/t/meetup.rakutest @@ -0,0 +1 @@ +../../../t/meetup.rakutest \ No newline at end of file diff --git a/exercises/practice/meetup/Meetup.rakumod b/exercises/practice/meetup/lib/Meetup.rakumod similarity index 100% rename from exercises/practice/meetup/Meetup.rakumod rename to exercises/practice/meetup/lib/Meetup.rakumod diff --git a/exercises/practice/meetup/meetup.rakutest b/exercises/practice/meetup/t/meetup.rakutest similarity index 99% rename from exercises/practice/meetup/meetup.rakutest rename to exercises/practice/meetup/t/meetup.rakutest index 3044c509..c6722f33 100755 --- a/exercises/practice/meetup/meetup.rakutest +++ b/exercises/practice/meetup/t/meetup.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Meetup; cmp-ok( # begin: d7f8eadd-d4fc-46ee-8a20-e97bd3fd01c8 diff --git a/exercises/practice/nucleotide-count/.meta/config.json b/exercises/practice/nucleotide-count/.meta/config.json index b535be19..7799548e 100644 --- a/exercises/practice/nucleotide-count/.meta/config.json +++ b/exercises/practice/nucleotide-count/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "NucleotideCount.rakumod" + "lib/NucleotideCount.rakumod" ], "test": [ - "nucleotide-count.rakutest" + "t/nucleotide-count.rakutest" ], "example": [ - ".meta/solutions/NucleotideCount.rakumod" + ".meta/solutions/lib/NucleotideCount.rakumod" ] }, "blurb": "Given a DNA string, compute how many times each nucleotide occurs in the string.", diff --git a/exercises/practice/nucleotide-count/.meta/solutions/NucleotideCount.rakumod b/exercises/practice/nucleotide-count/.meta/solutions/lib/NucleotideCount.rakumod similarity index 94% rename from exercises/practice/nucleotide-count/.meta/solutions/NucleotideCount.rakumod rename to exercises/practice/nucleotide-count/.meta/solutions/lib/NucleotideCount.rakumod index 48f30b53..da5359ff 100644 --- a/exercises/practice/nucleotide-count/.meta/solutions/NucleotideCount.rakumod +++ b/exercises/practice/nucleotide-count/.meta/solutions/lib/NucleotideCount.rakumod @@ -1,3 +1,5 @@ +unit module NucleotideCount; + my role X::NucleotideCount is Exception {} my class X::NucleotideCount::InvalidNucleotide does X::NucleotideCount { diff --git a/exercises/practice/nucleotide-count/.meta/solutions/nucleotide-count.rakutest b/exercises/practice/nucleotide-count/.meta/solutions/nucleotide-count.rakutest deleted file mode 120000 index 43ccddca..00000000 --- a/exercises/practice/nucleotide-count/.meta/solutions/nucleotide-count.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../nucleotide-count.rakutest \ No newline at end of file diff --git a/exercises/practice/nucleotide-count/.meta/solutions/t/nucleotide-count.rakutest b/exercises/practice/nucleotide-count/.meta/solutions/t/nucleotide-count.rakutest new file mode 120000 index 00000000..9cec8082 --- /dev/null +++ b/exercises/practice/nucleotide-count/.meta/solutions/t/nucleotide-count.rakutest @@ -0,0 +1 @@ +../../../t/nucleotide-count.rakutest \ No newline at end of file diff --git a/exercises/practice/nucleotide-count/NucleotideCount.rakumod b/exercises/practice/nucleotide-count/lib/NucleotideCount.rakumod similarity index 71% rename from exercises/practice/nucleotide-count/NucleotideCount.rakumod rename to exercises/practice/nucleotide-count/lib/NucleotideCount.rakumod index 4d9908dc..bde0fe88 100644 --- a/exercises/practice/nucleotide-count/NucleotideCount.rakumod +++ b/exercises/practice/nucleotide-count/lib/NucleotideCount.rakumod @@ -1,4 +1,6 @@ unit module NucleotideCount; +unit module NucleotideCount; + sub nucleotide-count ($strand) is export { } diff --git a/exercises/practice/nucleotide-count/nucleotide-count.rakutest b/exercises/practice/nucleotide-count/t/nucleotide-count.rakutest similarity index 97% rename from exercises/practice/nucleotide-count/nucleotide-count.rakutest rename to exercises/practice/nucleotide-count/t/nucleotide-count.rakutest index b7e0e47d..7107a757 100755 --- a/exercises/practice/nucleotide-count/nucleotide-count.rakutest +++ b/exercises/practice/nucleotide-count/t/nucleotide-count.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use NucleotideCount; cmp-ok( # begin: 3e5c30a8-87e2-4845-a815-a49671ade970 diff --git a/exercises/practice/pangram/.meta/config.json b/exercises/practice/pangram/.meta/config.json index 0a7cc66e..51f066f5 100644 --- a/exercises/practice/pangram/.meta/config.json +++ b/exercises/practice/pangram/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Pangram.rakumod" + "lib/Pangram.rakumod" ], "test": [ - "pangram.rakutest" + "t/pangram.rakutest" ], "example": [ - ".meta/solutions/Pangram.rakumod" + ".meta/solutions/lib/Pangram.rakumod" ] }, "blurb": "Determine if a sentence is a pangram.", diff --git a/exercises/practice/pangram/.meta/solutions/Pangram.rakumod b/exercises/practice/pangram/.meta/solutions/lib/Pangram.rakumod similarity index 100% rename from exercises/practice/pangram/.meta/solutions/Pangram.rakumod rename to exercises/practice/pangram/.meta/solutions/lib/Pangram.rakumod diff --git a/exercises/practice/pangram/.meta/solutions/pangram.rakutest b/exercises/practice/pangram/.meta/solutions/pangram.rakutest deleted file mode 120000 index 86b7dbc8..00000000 --- a/exercises/practice/pangram/.meta/solutions/pangram.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../pangram.rakutest \ No newline at end of file diff --git a/exercises/practice/pangram/.meta/solutions/t/pangram.rakutest b/exercises/practice/pangram/.meta/solutions/t/pangram.rakutest new file mode 120000 index 00000000..784909f3 --- /dev/null +++ b/exercises/practice/pangram/.meta/solutions/t/pangram.rakutest @@ -0,0 +1 @@ +../../../t/pangram.rakutest \ No newline at end of file diff --git a/exercises/practice/pangram/Pangram.rakumod b/exercises/practice/pangram/lib/Pangram.rakumod similarity index 100% rename from exercises/practice/pangram/Pangram.rakumod rename to exercises/practice/pangram/lib/Pangram.rakumod diff --git a/exercises/practice/pangram/pangram.rakutest b/exercises/practice/pangram/t/pangram.rakutest similarity index 98% rename from exercises/practice/pangram/pangram.rakutest rename to exercises/practice/pangram/t/pangram.rakutest index e97822ac..e795d3b7 100755 --- a/exercises/practice/pangram/pangram.rakutest +++ b/exercises/practice/pangram/t/pangram.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Pangram; cmp-ok( # begin: 64f61791-508e-4f5c-83ab-05de042b0149 diff --git a/exercises/practice/pascals-triangle/.meta/config.json b/exercises/practice/pascals-triangle/.meta/config.json index 2b49a829..ccf72a4d 100644 --- a/exercises/practice/pascals-triangle/.meta/config.json +++ b/exercises/practice/pascals-triangle/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "PascalsTriangle.rakumod" + "lib/PascalsTriangle.rakumod" ], "test": [ - "pascals-triangle.rakutest" + "t/pascals-triangle.rakutest" ], "example": [ - ".meta/solutions/PascalsTriangle.rakumod" + ".meta/solutions/lib/PascalsTriangle.rakumod" ] }, "blurb": "Compute Pascal's triangle up to a given number of rows.", diff --git a/exercises/practice/pascals-triangle/.meta/solutions/PascalsTriangle.rakumod b/exercises/practice/pascals-triangle/.meta/solutions/lib/PascalsTriangle.rakumod similarity index 78% rename from exercises/practice/pascals-triangle/.meta/solutions/PascalsTriangle.rakumod rename to exercises/practice/pascals-triangle/.meta/solutions/lib/PascalsTriangle.rakumod index 7617883c..4e5c7df4 100644 --- a/exercises/practice/pascals-triangle/.meta/solutions/PascalsTriangle.rakumod +++ b/exercises/practice/pascals-triangle/.meta/solutions/lib/PascalsTriangle.rakumod @@ -1,3 +1,5 @@ +unit module PascalsTriangle; + sub pascals-triangle ( $rows ) is export { [ 1 ], { [ 0, .Slip Z+ .Slip, 0 ] } ... * andthen .[ ^ $rows ] diff --git a/exercises/practice/pascals-triangle/.meta/solutions/pascals-triangle.rakutest b/exercises/practice/pascals-triangle/.meta/solutions/pascals-triangle.rakutest deleted file mode 120000 index a1e81932..00000000 --- a/exercises/practice/pascals-triangle/.meta/solutions/pascals-triangle.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../pascals-triangle.rakutest \ No newline at end of file diff --git a/exercises/practice/pascals-triangle/.meta/solutions/t/pascals-triangle.rakutest b/exercises/practice/pascals-triangle/.meta/solutions/t/pascals-triangle.rakutest new file mode 120000 index 00000000..f8efb49d --- /dev/null +++ b/exercises/practice/pascals-triangle/.meta/solutions/t/pascals-triangle.rakutest @@ -0,0 +1 @@ +../../../t/pascals-triangle.rakutest \ No newline at end of file diff --git a/exercises/practice/pascals-triangle/PascalsTriangle.rakumod b/exercises/practice/pascals-triangle/lib/PascalsTriangle.rakumod similarity index 60% rename from exercises/practice/pascals-triangle/PascalsTriangle.rakumod rename to exercises/practice/pascals-triangle/lib/PascalsTriangle.rakumod index bfe46a44..12d69b26 100644 --- a/exercises/practice/pascals-triangle/PascalsTriangle.rakumod +++ b/exercises/practice/pascals-triangle/lib/PascalsTriangle.rakumod @@ -1,2 +1,4 @@ +unit module PascalsTriangle; + sub pascals-triangle ( $rows ) is export { } diff --git a/exercises/practice/pascals-triangle/pascals-triangle.rakutest b/exercises/practice/pascals-triangle/t/pascals-triangle.rakutest similarity index 97% rename from exercises/practice/pascals-triangle/pascals-triangle.rakutest rename to exercises/practice/pascals-triangle/t/pascals-triangle.rakutest index 22a132dd..aad786f9 100755 --- a/exercises/practice/pascals-triangle/pascals-triangle.rakutest +++ b/exercises/practice/pascals-triangle/t/pascals-triangle.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use PascalsTriangle; cmp-ok( # begin: 9920ce55-9629-46d5-85d6-4201f4a4234d diff --git a/exercises/practice/perfect-numbers/.meta/config.json b/exercises/practice/perfect-numbers/.meta/config.json index 7479ad54..9dd95747 100644 --- a/exercises/practice/perfect-numbers/.meta/config.json +++ b/exercises/practice/perfect-numbers/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "PerfectNumbers.rakumod" + "lib/PerfectNumbers.rakumod" ], "test": [ - "perfect-numbers.rakutest" + "t/perfect-numbers.rakutest" ], "example": [ - ".meta/solutions/PerfectNumbers.rakumod" + ".meta/solutions/lib/PerfectNumbers.rakumod" ] }, "blurb": "Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.", diff --git a/exercises/practice/perfect-numbers/.meta/solutions/PerfectNumbers.rakumod b/exercises/practice/perfect-numbers/.meta/solutions/lib/PerfectNumbers.rakumod similarity index 100% rename from exercises/practice/perfect-numbers/.meta/solutions/PerfectNumbers.rakumod rename to exercises/practice/perfect-numbers/.meta/solutions/lib/PerfectNumbers.rakumod diff --git a/exercises/practice/perfect-numbers/.meta/solutions/perfect-numbers.rakutest b/exercises/practice/perfect-numbers/.meta/solutions/perfect-numbers.rakutest deleted file mode 120000 index c1a4156a..00000000 --- a/exercises/practice/perfect-numbers/.meta/solutions/perfect-numbers.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../perfect-numbers.rakutest \ No newline at end of file diff --git a/exercises/practice/perfect-numbers/.meta/solutions/t/perfect-numbers.rakutest b/exercises/practice/perfect-numbers/.meta/solutions/t/perfect-numbers.rakutest new file mode 120000 index 00000000..7097a0f6 --- /dev/null +++ b/exercises/practice/perfect-numbers/.meta/solutions/t/perfect-numbers.rakutest @@ -0,0 +1 @@ +../../../t/perfect-numbers.rakutest \ No newline at end of file diff --git a/exercises/practice/perfect-numbers/PerfectNumbers.rakumod b/exercises/practice/perfect-numbers/lib/PerfectNumbers.rakumod similarity index 100% rename from exercises/practice/perfect-numbers/PerfectNumbers.rakumod rename to exercises/practice/perfect-numbers/lib/PerfectNumbers.rakumod diff --git a/exercises/practice/perfect-numbers/perfect-numbers.rakutest b/exercises/practice/perfect-numbers/t/perfect-numbers.rakutest similarity index 98% rename from exercises/practice/perfect-numbers/perfect-numbers.rakutest rename to exercises/practice/perfect-numbers/t/perfect-numbers.rakutest index e0a6fc2e..3efb88b4 100755 --- a/exercises/practice/perfect-numbers/perfect-numbers.rakutest +++ b/exercises/practice/perfect-numbers/t/perfect-numbers.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use PerfectNumbers; cmp-ok( # begin: 163e8e86-7bfd-4ee2-bd68-d083dc3381a3 diff --git a/exercises/practice/phone-number/.meta/config.json b/exercises/practice/phone-number/.meta/config.json index 2cee5ce9..295c553a 100644 --- a/exercises/practice/phone-number/.meta/config.json +++ b/exercises/practice/phone-number/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "PhoneNumber.rakumod" + "lib/PhoneNumber.rakumod" ], "test": [ - "phone-number.rakutest" + "t/phone-number.rakutest" ], "example": [ - ".meta/solutions/PhoneNumber.rakumod" + ".meta/solutions/lib/PhoneNumber.rakumod" ] }, "blurb": "Clean up user-entered phone numbers so that they can be sent SMS messages.", diff --git a/exercises/practice/phone-number/.meta/solutions/PhoneNumber.rakumod b/exercises/practice/phone-number/.meta/solutions/lib/PhoneNumber.rakumod similarity index 100% rename from exercises/practice/phone-number/.meta/solutions/PhoneNumber.rakumod rename to exercises/practice/phone-number/.meta/solutions/lib/PhoneNumber.rakumod diff --git a/exercises/practice/phone-number/.meta/solutions/phone-number.rakutest b/exercises/practice/phone-number/.meta/solutions/phone-number.rakutest deleted file mode 120000 index b983bf95..00000000 --- a/exercises/practice/phone-number/.meta/solutions/phone-number.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../phone-number.rakutest \ No newline at end of file diff --git a/exercises/practice/phone-number/.meta/solutions/t/phone-number.rakutest b/exercises/practice/phone-number/.meta/solutions/t/phone-number.rakutest new file mode 120000 index 00000000..3cb338c9 --- /dev/null +++ b/exercises/practice/phone-number/.meta/solutions/t/phone-number.rakutest @@ -0,0 +1 @@ +../../../t/phone-number.rakutest \ No newline at end of file diff --git a/exercises/practice/phone-number/PhoneNumber.rakumod b/exercises/practice/phone-number/lib/PhoneNumber.rakumod similarity index 100% rename from exercises/practice/phone-number/PhoneNumber.rakumod rename to exercises/practice/phone-number/lib/PhoneNumber.rakumod diff --git a/exercises/practice/phone-number/phone-number.rakutest b/exercises/practice/phone-number/t/phone-number.rakutest similarity index 99% rename from exercises/practice/phone-number/phone-number.rakutest rename to exercises/practice/phone-number/t/phone-number.rakutest index e7048072..23bd2bd6 100755 --- a/exercises/practice/phone-number/phone-number.rakutest +++ b/exercises/practice/phone-number/t/phone-number.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use PhoneNumber; cmp-ok( # begin: 79666dce-e0f1-46de-95a1-563802913c35 diff --git a/exercises/practice/prime-factors/.meta/config.json b/exercises/practice/prime-factors/.meta/config.json index d65b99e9..abd4ee51 100644 --- a/exercises/practice/prime-factors/.meta/config.json +++ b/exercises/practice/prime-factors/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "PrimeFactors.rakumod" + "lib/PrimeFactors.rakumod" ], "test": [ - "prime-factors.rakutest" + "t/prime-factors.rakutest" ], "example": [ - ".meta/solutions/PrimeFactors.rakumod" + ".meta/solutions/lib/PrimeFactors.rakumod" ] }, "blurb": "Compute the prime factors of a given natural number.", diff --git a/exercises/practice/prime-factors/.meta/solutions/PrimeFactors.rakumod b/exercises/practice/prime-factors/.meta/solutions/lib/PrimeFactors.rakumod similarity index 100% rename from exercises/practice/prime-factors/.meta/solutions/PrimeFactors.rakumod rename to exercises/practice/prime-factors/.meta/solutions/lib/PrimeFactors.rakumod diff --git a/exercises/practice/prime-factors/.meta/solutions/prime-factors.rakutest b/exercises/practice/prime-factors/.meta/solutions/prime-factors.rakutest deleted file mode 120000 index 4b73c303..00000000 --- a/exercises/practice/prime-factors/.meta/solutions/prime-factors.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../prime-factors.rakutest \ No newline at end of file diff --git a/exercises/practice/prime-factors/.meta/solutions/t/prime-factors.rakutest b/exercises/practice/prime-factors/.meta/solutions/t/prime-factors.rakutest new file mode 120000 index 00000000..a32fa687 --- /dev/null +++ b/exercises/practice/prime-factors/.meta/solutions/t/prime-factors.rakutest @@ -0,0 +1 @@ +../../../t/prime-factors.rakutest \ No newline at end of file diff --git a/exercises/practice/prime-factors/PrimeFactors.rakumod b/exercises/practice/prime-factors/lib/PrimeFactors.rakumod similarity index 100% rename from exercises/practice/prime-factors/PrimeFactors.rakumod rename to exercises/practice/prime-factors/lib/PrimeFactors.rakumod diff --git a/exercises/practice/prime-factors/prime-factors.rakutest b/exercises/practice/prime-factors/t/prime-factors.rakutest similarity index 98% rename from exercises/practice/prime-factors/prime-factors.rakutest rename to exercises/practice/prime-factors/t/prime-factors.rakutest index b23462ad..cb2343b8 100755 --- a/exercises/practice/prime-factors/prime-factors.rakutest +++ b/exercises/practice/prime-factors/t/prime-factors.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use PrimeFactors; cmp-ok( # begin: 924fc966-a8f5-4288-82f2-6b9224819ccd diff --git a/exercises/practice/pythagorean-triplet/.meta/config.json b/exercises/practice/pythagorean-triplet/.meta/config.json index 000d92d6..f9e853d5 100644 --- a/exercises/practice/pythagorean-triplet/.meta/config.json +++ b/exercises/practice/pythagorean-triplet/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "PythagoreanTriplet.rakumod" + "lib/PythagoreanTriplet.rakumod" ], "test": [ - "pythagorean-triplet.rakutest" + "t/pythagorean-triplet.rakutest" ], "example": [ - ".meta/solutions/PythagoreanTriplet.rakumod" + ".meta/solutions/lib/PythagoreanTriplet.rakumod" ] }, "blurb": "There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product a * b * c.", diff --git a/exercises/practice/pythagorean-triplet/.meta/solutions/PythagoreanTriplet.rakumod b/exercises/practice/pythagorean-triplet/.meta/solutions/lib/PythagoreanTriplet.rakumod similarity index 100% rename from exercises/practice/pythagorean-triplet/.meta/solutions/PythagoreanTriplet.rakumod rename to exercises/practice/pythagorean-triplet/.meta/solutions/lib/PythagoreanTriplet.rakumod diff --git a/exercises/practice/pythagorean-triplet/.meta/solutions/pythagorean-triplet.rakutest b/exercises/practice/pythagorean-triplet/.meta/solutions/pythagorean-triplet.rakutest deleted file mode 120000 index 64ffc669..00000000 --- a/exercises/practice/pythagorean-triplet/.meta/solutions/pythagorean-triplet.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../pythagorean-triplet.rakutest \ No newline at end of file diff --git a/exercises/practice/pythagorean-triplet/.meta/solutions/t/pythagorean-triplet.rakutest b/exercises/practice/pythagorean-triplet/.meta/solutions/t/pythagorean-triplet.rakutest new file mode 120000 index 00000000..cf315b49 --- /dev/null +++ b/exercises/practice/pythagorean-triplet/.meta/solutions/t/pythagorean-triplet.rakutest @@ -0,0 +1 @@ +../../../t/pythagorean-triplet.rakutest \ No newline at end of file diff --git a/exercises/practice/pythagorean-triplet/PythagoreanTriplet.rakumod b/exercises/practice/pythagorean-triplet/lib/PythagoreanTriplet.rakumod similarity index 100% rename from exercises/practice/pythagorean-triplet/PythagoreanTriplet.rakumod rename to exercises/practice/pythagorean-triplet/lib/PythagoreanTriplet.rakumod diff --git a/exercises/practice/pythagorean-triplet/pythagorean-triplet.rakutest b/exercises/practice/pythagorean-triplet/t/pythagorean-triplet.rakutest similarity index 97% rename from exercises/practice/pythagorean-triplet/pythagorean-triplet.rakutest rename to exercises/practice/pythagorean-triplet/t/pythagorean-triplet.rakutest index 19af8951..ceeaf080 100755 --- a/exercises/practice/pythagorean-triplet/pythagorean-triplet.rakutest +++ b/exercises/practice/pythagorean-triplet/t/pythagorean-triplet.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use PythagoreanTriplet; cmp-ok( # begin: a19de65d-35b8-4480-b1af-371d9541e706 diff --git a/exercises/practice/queen-attack/.meta/config.json b/exercises/practice/queen-attack/.meta/config.json index 04321ed1..b3ee9fd9 100644 --- a/exercises/practice/queen-attack/.meta/config.json +++ b/exercises/practice/queen-attack/.meta/config.json @@ -5,13 +5,13 @@ ], "files": { "solution": [ - "Queen.rakumod" + "lib/Queen.rakumod" ], "test": [ - "queen-attack.rakutest" + "t/queen-attack.rakutest" ], "example": [ - ".meta/solutions/Queen.rakumod" + ".meta/solutions/lib/Queen.rakumod" ] }, "blurb": "Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.", diff --git a/exercises/practice/queen-attack/.meta/solutions/Queen.rakumod b/exercises/practice/queen-attack/.meta/solutions/lib/Queen.rakumod similarity index 100% rename from exercises/practice/queen-attack/.meta/solutions/Queen.rakumod rename to exercises/practice/queen-attack/.meta/solutions/lib/Queen.rakumod diff --git a/exercises/practice/queen-attack/.meta/solutions/queen-attack.rakutest b/exercises/practice/queen-attack/.meta/solutions/queen-attack.rakutest deleted file mode 120000 index 9d8a2fe2..00000000 --- a/exercises/practice/queen-attack/.meta/solutions/queen-attack.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../queen-attack.rakutest \ No newline at end of file diff --git a/exercises/practice/queen-attack/.meta/solutions/t/queen-attack.rakutest b/exercises/practice/queen-attack/.meta/solutions/t/queen-attack.rakutest new file mode 120000 index 00000000..938d26fb --- /dev/null +++ b/exercises/practice/queen-attack/.meta/solutions/t/queen-attack.rakutest @@ -0,0 +1 @@ +../../../t/queen-attack.rakutest \ No newline at end of file diff --git a/exercises/practice/queen-attack/Queen.rakumod b/exercises/practice/queen-attack/lib/Queen.rakumod similarity index 100% rename from exercises/practice/queen-attack/Queen.rakumod rename to exercises/practice/queen-attack/lib/Queen.rakumod diff --git a/exercises/practice/queen-attack/queen-attack.rakutest b/exercises/practice/queen-attack/t/queen-attack.rakutest similarity index 99% rename from exercises/practice/queen-attack/queen-attack.rakutest rename to exercises/practice/queen-attack/t/queen-attack.rakutest index d8d4e7b7..2f49b350 100755 --- a/exercises/practice/queen-attack/queen-attack.rakutest +++ b/exercises/practice/queen-attack/t/queen-attack.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Queen; my Queen %queen; diff --git a/exercises/practice/raindrops/.meta/config.json b/exercises/practice/raindrops/.meta/config.json index bd1adf1d..0707b795 100644 --- a/exercises/practice/raindrops/.meta/config.json +++ b/exercises/practice/raindrops/.meta/config.json @@ -9,13 +9,13 @@ ], "files": { "solution": [ - "Raindrops.rakumod" + "lib/Raindrops.rakumod" ], "test": [ - "raindrops.rakutest" + "t/raindrops.rakutest" ], "example": [ - ".meta/solutions/Raindrops.rakumod" + ".meta/solutions/lib/Raindrops.rakumod" ] }, "blurb": "Convert a number to a string, the content of which depends on the number's factors.", diff --git a/exercises/practice/raindrops/.meta/solutions/Raindrops.rakumod b/exercises/practice/raindrops/.meta/solutions/lib/Raindrops.rakumod similarity index 100% rename from exercises/practice/raindrops/.meta/solutions/Raindrops.rakumod rename to exercises/practice/raindrops/.meta/solutions/lib/Raindrops.rakumod diff --git a/exercises/practice/raindrops/.meta/solutions/raindrops.rakutest b/exercises/practice/raindrops/.meta/solutions/raindrops.rakutest deleted file mode 120000 index 6607c2dc..00000000 --- a/exercises/practice/raindrops/.meta/solutions/raindrops.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../raindrops.rakutest \ No newline at end of file diff --git a/exercises/practice/raindrops/.meta/solutions/t/raindrops.rakutest b/exercises/practice/raindrops/.meta/solutions/t/raindrops.rakutest new file mode 120000 index 00000000..2b331558 --- /dev/null +++ b/exercises/practice/raindrops/.meta/solutions/t/raindrops.rakutest @@ -0,0 +1 @@ +../../../t/raindrops.rakutest \ No newline at end of file diff --git a/exercises/practice/raindrops/Raindrops.rakumod b/exercises/practice/raindrops/lib/Raindrops.rakumod similarity index 100% rename from exercises/practice/raindrops/Raindrops.rakumod rename to exercises/practice/raindrops/lib/Raindrops.rakumod diff --git a/exercises/practice/raindrops/raindrops.rakutest b/exercises/practice/raindrops/t/raindrops.rakutest similarity index 98% rename from exercises/practice/raindrops/raindrops.rakutest rename to exercises/practice/raindrops/t/raindrops.rakutest index 7e52ae5c..c0190615 100755 --- a/exercises/practice/raindrops/raindrops.rakutest +++ b/exercises/practice/raindrops/t/raindrops.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Raindrops; cmp-ok( # begin: 1575d549-e502-46d4-a8e1-6b7bec6123d8 diff --git a/exercises/practice/resistor-color-duo/.meta/config.json b/exercises/practice/resistor-color-duo/.meta/config.json index be0c4dd3..fea9b931 100644 --- a/exercises/practice/resistor-color-duo/.meta/config.json +++ b/exercises/practice/resistor-color-duo/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "ResistorColorDuo.rakumod" + "lib/ResistorColorDuo.rakumod" ], "test": [ - "resistor-color-duo.rakutest" + "t/resistor-color-duo.rakutest" ], "example": [ - ".meta/solutions/ResistorColorDuo.rakumod" + ".meta/solutions/lib/ResistorColorDuo.rakumod" ] }, "blurb": "Convert color codes, as used on resistors, to a numeric value.", diff --git a/exercises/practice/resistor-color-duo/.meta/solutions/ResistorColorDuo.rakumod b/exercises/practice/resistor-color-duo/.meta/solutions/lib/ResistorColorDuo.rakumod similarity index 100% rename from exercises/practice/resistor-color-duo/.meta/solutions/ResistorColorDuo.rakumod rename to exercises/practice/resistor-color-duo/.meta/solutions/lib/ResistorColorDuo.rakumod diff --git a/exercises/practice/resistor-color-duo/.meta/solutions/resistor-color-duo.rakutest b/exercises/practice/resistor-color-duo/.meta/solutions/resistor-color-duo.rakutest deleted file mode 120000 index 023b7511..00000000 --- a/exercises/practice/resistor-color-duo/.meta/solutions/resistor-color-duo.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../resistor-color-duo.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color-duo/.meta/solutions/t/resistor-color-duo.rakutest b/exercises/practice/resistor-color-duo/.meta/solutions/t/resistor-color-duo.rakutest new file mode 120000 index 00000000..590d8010 --- /dev/null +++ b/exercises/practice/resistor-color-duo/.meta/solutions/t/resistor-color-duo.rakutest @@ -0,0 +1 @@ +../../../t/resistor-color-duo.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color-duo/ResistorColorDuo.rakumod b/exercises/practice/resistor-color-duo/lib/ResistorColorDuo.rakumod similarity index 100% rename from exercises/practice/resistor-color-duo/ResistorColorDuo.rakumod rename to exercises/practice/resistor-color-duo/lib/ResistorColorDuo.rakumod diff --git a/exercises/practice/resistor-color-duo/resistor-color-duo.rakutest b/exercises/practice/resistor-color-duo/t/resistor-color-duo.rakutest similarity index 97% rename from exercises/practice/resistor-color-duo/resistor-color-duo.rakutest rename to exercises/practice/resistor-color-duo/t/resistor-color-duo.rakutest index f57676ea..40a9e6df 100755 --- a/exercises/practice/resistor-color-duo/resistor-color-duo.rakutest +++ b/exercises/practice/resistor-color-duo/t/resistor-color-duo.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ResistorColorDuo; cmp-ok( # begin: ce11995a-5b93-4950-a5e9-93423693b2fc diff --git a/exercises/practice/resistor-color-trio/.meta/config.json b/exercises/practice/resistor-color-trio/.meta/config.json index efd52167..5e47eab4 100644 --- a/exercises/practice/resistor-color-trio/.meta/config.json +++ b/exercises/practice/resistor-color-trio/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "ResistorColorTrio.rakumod" + "lib/ResistorColorTrio.rakumod" ], "test": [ - "resistor-color-trio.rakutest" + "t/resistor-color-trio.rakutest" ], "example": [ - ".meta/solutions/ResistorColorTrio.rakumod" + ".meta/solutions/lib/ResistorColorTrio.rakumod" ] }, "blurb": "Convert color codes, as used on resistors, to a human-readable label.", diff --git a/exercises/practice/resistor-color-trio/.meta/solutions/ResistorColorTrio.rakumod b/exercises/practice/resistor-color-trio/.meta/solutions/lib/ResistorColorTrio.rakumod similarity index 100% rename from exercises/practice/resistor-color-trio/.meta/solutions/ResistorColorTrio.rakumod rename to exercises/practice/resistor-color-trio/.meta/solutions/lib/ResistorColorTrio.rakumod diff --git a/exercises/practice/resistor-color-trio/.meta/solutions/resistor-color-trio.rakutest b/exercises/practice/resistor-color-trio/.meta/solutions/resistor-color-trio.rakutest deleted file mode 120000 index 6f8a1ec2..00000000 --- a/exercises/practice/resistor-color-trio/.meta/solutions/resistor-color-trio.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../resistor-color-trio.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color-trio/.meta/solutions/t/resistor-color-trio.rakutest b/exercises/practice/resistor-color-trio/.meta/solutions/t/resistor-color-trio.rakutest new file mode 120000 index 00000000..29024fa6 --- /dev/null +++ b/exercises/practice/resistor-color-trio/.meta/solutions/t/resistor-color-trio.rakutest @@ -0,0 +1 @@ +../../../t/resistor-color-trio.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color-trio/ResistorColorTrio.rakumod b/exercises/practice/resistor-color-trio/lib/ResistorColorTrio.rakumod similarity index 100% rename from exercises/practice/resistor-color-trio/ResistorColorTrio.rakumod rename to exercises/practice/resistor-color-trio/lib/ResistorColorTrio.rakumod diff --git a/exercises/practice/resistor-color-trio/resistor-color-trio.rakutest b/exercises/practice/resistor-color-trio/t/resistor-color-trio.rakutest similarity index 98% rename from exercises/practice/resistor-color-trio/resistor-color-trio.rakutest rename to exercises/practice/resistor-color-trio/t/resistor-color-trio.rakutest index df52ba7b..442a3b4e 100755 --- a/exercises/practice/resistor-color-trio/resistor-color-trio.rakutest +++ b/exercises/practice/resistor-color-trio/t/resistor-color-trio.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ResistorColorTrio; cmp-ok( # begin: d6863355-15b7-40bb-abe0-bfb1a25512ed diff --git a/exercises/practice/resistor-color/.meta/config.json b/exercises/practice/resistor-color/.meta/config.json index ff7c0913..d917e497 100644 --- a/exercises/practice/resistor-color/.meta/config.json +++ b/exercises/practice/resistor-color/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "ResistorColor.rakumod" + "lib/ResistorColor.rakumod" ], "test": [ - "resistor-color.rakutest" + "t/resistor-color.rakutest" ], "example": [ - ".meta/solutions/ResistorColor.rakumod" + ".meta/solutions/lib/ResistorColor.rakumod" ] }, "blurb": "Convert a resistor band's color to its numeric representation.", diff --git a/exercises/practice/resistor-color/.meta/solutions/ResistorColor.rakumod b/exercises/practice/resistor-color/.meta/solutions/lib/ResistorColor.rakumod similarity index 100% rename from exercises/practice/resistor-color/.meta/solutions/ResistorColor.rakumod rename to exercises/practice/resistor-color/.meta/solutions/lib/ResistorColor.rakumod diff --git a/exercises/practice/resistor-color/.meta/solutions/resistor-color.rakutest b/exercises/practice/resistor-color/.meta/solutions/resistor-color.rakutest deleted file mode 120000 index 609a2532..00000000 --- a/exercises/practice/resistor-color/.meta/solutions/resistor-color.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../resistor-color.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color/.meta/solutions/t/resistor-color.rakutest b/exercises/practice/resistor-color/.meta/solutions/t/resistor-color.rakutest new file mode 120000 index 00000000..2fa7638a --- /dev/null +++ b/exercises/practice/resistor-color/.meta/solutions/t/resistor-color.rakutest @@ -0,0 +1 @@ +../../../t/resistor-color.rakutest \ No newline at end of file diff --git a/exercises/practice/resistor-color/ResistorColor.rakumod b/exercises/practice/resistor-color/lib/ResistorColor.rakumod similarity index 100% rename from exercises/practice/resistor-color/ResistorColor.rakumod rename to exercises/practice/resistor-color/lib/ResistorColor.rakumod diff --git a/exercises/practice/resistor-color/resistor-color.rakutest b/exercises/practice/resistor-color/t/resistor-color.rakutest similarity index 95% rename from exercises/practice/resistor-color/resistor-color.rakutest rename to exercises/practice/resistor-color/t/resistor-color.rakutest index 8114d5f7..86cf000c 100755 --- a/exercises/practice/resistor-color/resistor-color.rakutest +++ b/exercises/practice/resistor-color/t/resistor-color.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ResistorColor; cmp-ok( # begin: 49eb31c5-10a8-4180-9f7f-fea632ab87ef diff --git a/exercises/practice/reverse-string/.meta/config.json b/exercises/practice/reverse-string/.meta/config.json index 4901b6fc..56abf94d 100644 --- a/exercises/practice/reverse-string/.meta/config.json +++ b/exercises/practice/reverse-string/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "ReverseString.rakumod" + "lib/ReverseString.rakumod" ], "test": [ - "reverse-string.rakutest" + "t/reverse-string.rakutest" ], "example": [ - ".meta/solutions/ReverseString.rakumod" + ".meta/solutions/lib/ReverseString.rakumod" ] }, "blurb": "Reverse a string.", diff --git a/exercises/practice/reverse-string/.meta/solutions/ReverseString.rakumod b/exercises/practice/reverse-string/.meta/solutions/lib/ReverseString.rakumod similarity index 100% rename from exercises/practice/reverse-string/.meta/solutions/ReverseString.rakumod rename to exercises/practice/reverse-string/.meta/solutions/lib/ReverseString.rakumod diff --git a/exercises/practice/reverse-string/.meta/solutions/reverse-string.rakutest b/exercises/practice/reverse-string/.meta/solutions/reverse-string.rakutest deleted file mode 120000 index 39efd7c8..00000000 --- a/exercises/practice/reverse-string/.meta/solutions/reverse-string.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../reverse-string.rakutest \ No newline at end of file diff --git a/exercises/practice/reverse-string/.meta/solutions/t/reverse-string.rakutest b/exercises/practice/reverse-string/.meta/solutions/t/reverse-string.rakutest new file mode 120000 index 00000000..d667fc28 --- /dev/null +++ b/exercises/practice/reverse-string/.meta/solutions/t/reverse-string.rakutest @@ -0,0 +1 @@ +../../../t/reverse-string.rakutest \ No newline at end of file diff --git a/exercises/practice/reverse-string/ReverseString.rakumod b/exercises/practice/reverse-string/lib/ReverseString.rakumod similarity index 100% rename from exercises/practice/reverse-string/ReverseString.rakumod rename to exercises/practice/reverse-string/lib/ReverseString.rakumod diff --git a/exercises/practice/reverse-string/reverse-string.rakutest b/exercises/practice/reverse-string/t/reverse-string.rakutest similarity index 98% rename from exercises/practice/reverse-string/reverse-string.rakutest rename to exercises/practice/reverse-string/t/reverse-string.rakutest index d3adee3d..aa6c1231 100755 --- a/exercises/practice/reverse-string/reverse-string.rakutest +++ b/exercises/practice/reverse-string/t/reverse-string.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use ReverseString; subtest "an empty string" => { # begin: c3b7d806-dced-49ee-8543-933fd1719b1c diff --git a/exercises/practice/rna-transcription/.meta/config.json b/exercises/practice/rna-transcription/.meta/config.json index 0e805774..5d1260f5 100644 --- a/exercises/practice/rna-transcription/.meta/config.json +++ b/exercises/practice/rna-transcription/.meta/config.json @@ -10,13 +10,13 @@ ], "files": { "solution": [ - "RNA.rakumod" + "lib/RNA.rakumod" ], "test": [ - "rna-transcription.rakutest" + "t/rna-transcription.rakutest" ], "example": [ - ".meta/solutions/RNA.rakumod" + ".meta/solutions/lib/RNA.rakumod" ] }, "blurb": "Given a DNA strand, return its RNA Complement Transcription.", diff --git a/exercises/practice/rna-transcription/.meta/solutions/RNA.rakumod b/exercises/practice/rna-transcription/.meta/solutions/lib/RNA.rakumod similarity index 100% rename from exercises/practice/rna-transcription/.meta/solutions/RNA.rakumod rename to exercises/practice/rna-transcription/.meta/solutions/lib/RNA.rakumod diff --git a/exercises/practice/rna-transcription/.meta/solutions/rna-transcription.rakutest b/exercises/practice/rna-transcription/.meta/solutions/rna-transcription.rakutest deleted file mode 120000 index 9b270d2b..00000000 --- a/exercises/practice/rna-transcription/.meta/solutions/rna-transcription.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../rna-transcription.rakutest \ No newline at end of file diff --git a/exercises/practice/rna-transcription/.meta/solutions/t/rna-transcription.rakutest b/exercises/practice/rna-transcription/.meta/solutions/t/rna-transcription.rakutest new file mode 120000 index 00000000..82977d33 --- /dev/null +++ b/exercises/practice/rna-transcription/.meta/solutions/t/rna-transcription.rakutest @@ -0,0 +1 @@ +../../../t/rna-transcription.rakutest \ No newline at end of file diff --git a/exercises/practice/rna-transcription/RNA.rakumod b/exercises/practice/rna-transcription/lib/RNA.rakumod similarity index 100% rename from exercises/practice/rna-transcription/RNA.rakumod rename to exercises/practice/rna-transcription/lib/RNA.rakumod diff --git a/exercises/practice/rna-transcription/rna-transcription.rakutest b/exercises/practice/rna-transcription/t/rna-transcription.rakutest similarity index 96% rename from exercises/practice/rna-transcription/rna-transcription.rakutest rename to exercises/practice/rna-transcription/t/rna-transcription.rakutest index 51961e04..d833f6db 100755 --- a/exercises/practice/rna-transcription/rna-transcription.rakutest +++ b/exercises/practice/rna-transcription/t/rna-transcription.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use RNA; cmp-ok( # begin: b4631f82-c98c-4a2f-90b3-c5c2b6c6f661 diff --git a/exercises/practice/robot-name/.meta/config.json b/exercises/practice/robot-name/.meta/config.json index ab149552..78d32855 100644 --- a/exercises/practice/robot-name/.meta/config.json +++ b/exercises/practice/robot-name/.meta/config.json @@ -10,13 +10,13 @@ ], "files": { "solution": [ - "Robot.rakumod" + "lib/Robot.rakumod" ], "test": [ - "robot-name.rakutest" + "t/robot-name.rakutest" ], "example": [ - ".meta/solutions/Robot.rakumod" + ".meta/solutions/lib/Robot.rakumod" ] }, "blurb": "Manage robot factory settings.", diff --git a/exercises/practice/robot-name/.meta/solutions/Robot.rakumod b/exercises/practice/robot-name/.meta/solutions/lib/Robot.rakumod similarity index 100% rename from exercises/practice/robot-name/.meta/solutions/Robot.rakumod rename to exercises/practice/robot-name/.meta/solutions/lib/Robot.rakumod diff --git a/exercises/practice/robot-name/.meta/solutions/robot-name.rakutest b/exercises/practice/robot-name/.meta/solutions/robot-name.rakutest deleted file mode 120000 index 0dad4672..00000000 --- a/exercises/practice/robot-name/.meta/solutions/robot-name.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../robot-name.rakutest \ No newline at end of file diff --git a/exercises/practice/robot-name/.meta/solutions/t/robot-name.rakutest b/exercises/practice/robot-name/.meta/solutions/t/robot-name.rakutest new file mode 120000 index 00000000..1f650257 --- /dev/null +++ b/exercises/practice/robot-name/.meta/solutions/t/robot-name.rakutest @@ -0,0 +1 @@ +../../../t/robot-name.rakutest \ No newline at end of file diff --git a/exercises/practice/robot-name/Robot.rakumod b/exercises/practice/robot-name/lib/Robot.rakumod similarity index 100% rename from exercises/practice/robot-name/Robot.rakumod rename to exercises/practice/robot-name/lib/Robot.rakumod diff --git a/exercises/practice/robot-name/robot-name.rakutest b/exercises/practice/robot-name/t/robot-name.rakutest similarity index 96% rename from exercises/practice/robot-name/robot-name.rakutest rename to exercises/practice/robot-name/t/robot-name.rakutest index bbd04e19..9837f214 100755 --- a/exercises/practice/robot-name/robot-name.rakutest +++ b/exercises/practice/robot-name/t/robot-name.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Robot; srand 1; # begin: 1 diff --git a/exercises/practice/roman-numerals/.meta/config.json b/exercises/practice/roman-numerals/.meta/config.json index 40afff42..d2993b6b 100644 --- a/exercises/practice/roman-numerals/.meta/config.json +++ b/exercises/practice/roman-numerals/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "RomanNumerals.rakumod" + "lib/RomanNumerals.rakumod" ], "test": [ - "roman-numerals.rakutest" + "t/roman-numerals.rakutest" ], "example": [ - ".meta/solutions/RomanNumerals.rakumod" + ".meta/solutions/lib/RomanNumerals.rakumod" ] }, "blurb": "Write a function to convert from normal numbers to Roman Numerals.", diff --git a/exercises/practice/roman-numerals/.meta/solutions/RomanNumerals.rakumod b/exercises/practice/roman-numerals/.meta/solutions/lib/RomanNumerals.rakumod similarity index 100% rename from exercises/practice/roman-numerals/.meta/solutions/RomanNumerals.rakumod rename to exercises/practice/roman-numerals/.meta/solutions/lib/RomanNumerals.rakumod diff --git a/exercises/practice/roman-numerals/.meta/solutions/roman-numerals.rakutest b/exercises/practice/roman-numerals/.meta/solutions/roman-numerals.rakutest deleted file mode 120000 index 40794a6d..00000000 --- a/exercises/practice/roman-numerals/.meta/solutions/roman-numerals.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../roman-numerals.rakutest \ No newline at end of file diff --git a/exercises/practice/roman-numerals/.meta/solutions/t/roman-numerals.rakutest b/exercises/practice/roman-numerals/.meta/solutions/t/roman-numerals.rakutest new file mode 120000 index 00000000..ce2bf0ff --- /dev/null +++ b/exercises/practice/roman-numerals/.meta/solutions/t/roman-numerals.rakutest @@ -0,0 +1 @@ +../../../t/roman-numerals.rakutest \ No newline at end of file diff --git a/exercises/practice/roman-numerals/RomanNumerals.rakumod b/exercises/practice/roman-numerals/lib/RomanNumerals.rakumod similarity index 100% rename from exercises/practice/roman-numerals/RomanNumerals.rakumod rename to exercises/practice/roman-numerals/lib/RomanNumerals.rakumod diff --git a/exercises/practice/roman-numerals/roman-numerals.rakutest b/exercises/practice/roman-numerals/t/roman-numerals.rakutest similarity index 99% rename from exercises/practice/roman-numerals/roman-numerals.rakutest rename to exercises/practice/roman-numerals/t/roman-numerals.rakutest index 27d47657..5070dd46 100755 --- a/exercises/practice/roman-numerals/roman-numerals.rakutest +++ b/exercises/practice/roman-numerals/t/roman-numerals.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use RomanNumerals; cmp-ok( # begin: 19828a3a-fbf7-4661-8ddd-cbaeee0e2178 diff --git a/exercises/practice/rotational-cipher/.meta/config.json b/exercises/practice/rotational-cipher/.meta/config.json index 498a4ae1..af0145d3 100644 --- a/exercises/practice/rotational-cipher/.meta/config.json +++ b/exercises/practice/rotational-cipher/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "RotationalCipher.rakumod" + "lib/RotationalCipher.rakumod" ], "test": [ - "rotational-cipher.rakutest" + "t/rotational-cipher.rakutest" ], "example": [ - ".meta/solutions/RotationalCipher.rakumod" + ".meta/solutions/lib/RotationalCipher.rakumod" ] }, "blurb": "Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.", diff --git a/exercises/practice/rotational-cipher/.meta/solutions/RotationalCipher.rakumod b/exercises/practice/rotational-cipher/.meta/solutions/lib/RotationalCipher.rakumod similarity index 100% rename from exercises/practice/rotational-cipher/.meta/solutions/RotationalCipher.rakumod rename to exercises/practice/rotational-cipher/.meta/solutions/lib/RotationalCipher.rakumod diff --git a/exercises/practice/rotational-cipher/.meta/solutions/rotational-cipher.rakutest b/exercises/practice/rotational-cipher/.meta/solutions/rotational-cipher.rakutest deleted file mode 120000 index 6a5bd283..00000000 --- a/exercises/practice/rotational-cipher/.meta/solutions/rotational-cipher.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../rotational-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/rotational-cipher/.meta/solutions/t/rotational-cipher.rakutest b/exercises/practice/rotational-cipher/.meta/solutions/t/rotational-cipher.rakutest new file mode 120000 index 00000000..b4e25187 --- /dev/null +++ b/exercises/practice/rotational-cipher/.meta/solutions/t/rotational-cipher.rakutest @@ -0,0 +1 @@ +../../../t/rotational-cipher.rakutest \ No newline at end of file diff --git a/exercises/practice/rotational-cipher/RotationalCipher.rakumod b/exercises/practice/rotational-cipher/lib/RotationalCipher.rakumod similarity index 100% rename from exercises/practice/rotational-cipher/RotationalCipher.rakumod rename to exercises/practice/rotational-cipher/lib/RotationalCipher.rakumod diff --git a/exercises/practice/rotational-cipher/rotational-cipher.rakutest b/exercises/practice/rotational-cipher/t/rotational-cipher.rakutest similarity index 98% rename from exercises/practice/rotational-cipher/rotational-cipher.rakutest rename to exercises/practice/rotational-cipher/t/rotational-cipher.rakutest index d394378e..c2600ffb 100755 --- a/exercises/practice/rotational-cipher/rotational-cipher.rakutest +++ b/exercises/practice/rotational-cipher/t/rotational-cipher.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use RotationalCipher; cmp-ok( # begin: 74e58a38-e484-43f1-9466-877a7515e10f diff --git a/exercises/practice/scrabble-score/.meta/config.json b/exercises/practice/scrabble-score/.meta/config.json index e3278042..599389e8 100644 --- a/exercises/practice/scrabble-score/.meta/config.json +++ b/exercises/practice/scrabble-score/.meta/config.json @@ -10,13 +10,13 @@ ], "files": { "solution": [ - "Scrabble.rakumod" + "lib/Scrabble.rakumod" ], "test": [ - "scrabble-score.rakutest" + "t/scrabble-score.rakutest" ], "example": [ - ".meta/solutions/Scrabble.rakumod" + ".meta/solutions/lib/Scrabble.rakumod" ] }, "blurb": "Given a word, compute the Scrabble score for that word.", diff --git a/exercises/practice/scrabble-score/.meta/solutions/Scrabble.rakumod b/exercises/practice/scrabble-score/.meta/solutions/lib/Scrabble.rakumod similarity index 100% rename from exercises/practice/scrabble-score/.meta/solutions/Scrabble.rakumod rename to exercises/practice/scrabble-score/.meta/solutions/lib/Scrabble.rakumod diff --git a/exercises/practice/scrabble-score/.meta/solutions/scrabble-score.rakutest b/exercises/practice/scrabble-score/.meta/solutions/scrabble-score.rakutest deleted file mode 120000 index b95f2726..00000000 --- a/exercises/practice/scrabble-score/.meta/solutions/scrabble-score.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../scrabble-score.rakutest \ No newline at end of file diff --git a/exercises/practice/scrabble-score/.meta/solutions/t/scrabble-score.rakutest b/exercises/practice/scrabble-score/.meta/solutions/t/scrabble-score.rakutest new file mode 120000 index 00000000..acb9f659 --- /dev/null +++ b/exercises/practice/scrabble-score/.meta/solutions/t/scrabble-score.rakutest @@ -0,0 +1 @@ +../../../t/scrabble-score.rakutest \ No newline at end of file diff --git a/exercises/practice/scrabble-score/Scrabble.rakumod b/exercises/practice/scrabble-score/lib/Scrabble.rakumod similarity index 100% rename from exercises/practice/scrabble-score/Scrabble.rakumod rename to exercises/practice/scrabble-score/lib/Scrabble.rakumod diff --git a/exercises/practice/scrabble-score/scrabble-score.rakutest b/exercises/practice/scrabble-score/t/scrabble-score.rakutest similarity index 98% rename from exercises/practice/scrabble-score/scrabble-score.rakutest rename to exercises/practice/scrabble-score/t/scrabble-score.rakutest index bc6aae1a..6eebc81f 100755 --- a/exercises/practice/scrabble-score/scrabble-score.rakutest +++ b/exercises/practice/scrabble-score/t/scrabble-score.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Scrabble; cmp-ok( # begin: f46cda29-1ca5-4ef2-bd45-388a767e3db2 diff --git a/exercises/practice/secret-handshake/.meta/config.json b/exercises/practice/secret-handshake/.meta/config.json index 363b7b65..f761a418 100644 --- a/exercises/practice/secret-handshake/.meta/config.json +++ b/exercises/practice/secret-handshake/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "SecretHandshake.rakumod" + "lib/SecretHandshake.rakumod" ], "test": [ - "secret-handshake.rakutest" + "t/secret-handshake.rakutest" ], "example": [ - ".meta/solutions/SecretHandshake.rakumod" + ".meta/solutions/lib/SecretHandshake.rakumod" ] }, "blurb": "Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.", diff --git a/exercises/practice/secret-handshake/.meta/solutions/SecretHandshake.rakumod b/exercises/practice/secret-handshake/.meta/solutions/lib/SecretHandshake.rakumod similarity index 100% rename from exercises/practice/secret-handshake/.meta/solutions/SecretHandshake.rakumod rename to exercises/practice/secret-handshake/.meta/solutions/lib/SecretHandshake.rakumod diff --git a/exercises/practice/secret-handshake/.meta/solutions/secret-handshake.rakutest b/exercises/practice/secret-handshake/.meta/solutions/secret-handshake.rakutest deleted file mode 120000 index a1b380c4..00000000 --- a/exercises/practice/secret-handshake/.meta/solutions/secret-handshake.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../secret-handshake.rakutest \ No newline at end of file diff --git a/exercises/practice/secret-handshake/.meta/solutions/t/secret-handshake.rakutest b/exercises/practice/secret-handshake/.meta/solutions/t/secret-handshake.rakutest new file mode 120000 index 00000000..2feab0c3 --- /dev/null +++ b/exercises/practice/secret-handshake/.meta/solutions/t/secret-handshake.rakutest @@ -0,0 +1 @@ +../../../t/secret-handshake.rakutest \ No newline at end of file diff --git a/exercises/practice/secret-handshake/SecretHandshake.rakumod b/exercises/practice/secret-handshake/lib/SecretHandshake.rakumod similarity index 100% rename from exercises/practice/secret-handshake/SecretHandshake.rakumod rename to exercises/practice/secret-handshake/lib/SecretHandshake.rakumod diff --git a/exercises/practice/secret-handshake/secret-handshake.rakutest b/exercises/practice/secret-handshake/t/secret-handshake.rakutest similarity index 98% rename from exercises/practice/secret-handshake/secret-handshake.rakutest rename to exercises/practice/secret-handshake/t/secret-handshake.rakutest index 01ea5619..2563bbdd 100755 --- a/exercises/practice/secret-handshake/secret-handshake.rakutest +++ b/exercises/practice/secret-handshake/t/secret-handshake.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use SecretHandshake; cmp-ok( # begin: b8496fbd-6778-468c-8054-648d03c4bb23 diff --git a/exercises/practice/series/.meta/config.json b/exercises/practice/series/.meta/config.json index 9c3229d6..f3a68e4e 100644 --- a/exercises/practice/series/.meta/config.json +++ b/exercises/practice/series/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Series.rakumod" + "lib/Series.rakumod" ], "test": [ - "series.rakutest" + "t/series.rakutest" ], "example": [ - ".meta/solutions/Series.rakumod" + ".meta/solutions/lib/Series.rakumod" ] }, "blurb": "Given a string of digits, output all the contiguous substrings of length `n` in that string.", diff --git a/exercises/practice/series/.meta/solutions/Series.rakumod b/exercises/practice/series/.meta/solutions/lib/Series.rakumod similarity index 87% rename from exercises/practice/series/.meta/solutions/Series.rakumod rename to exercises/practice/series/.meta/solutions/lib/Series.rakumod index d62a5bea..94048bc0 100644 --- a/exercises/practice/series/.meta/solutions/Series.rakumod +++ b/exercises/practice/series/.meta/solutions/lib/Series.rakumod @@ -1,3 +1,5 @@ +unit module Series; + sub series ( Str $string, Int $length where 1..$string.chars ) is export { gather take .join for $string.comb.rotor: $length => -$length.pred } diff --git a/exercises/practice/series/.meta/solutions/t/series.rakutest b/exercises/practice/series/.meta/solutions/t/series.rakutest new file mode 120000 index 00000000..6e01a5f7 --- /dev/null +++ b/exercises/practice/series/.meta/solutions/t/series.rakutest @@ -0,0 +1 @@ +../../../t/series.rakutest \ No newline at end of file diff --git a/exercises/practice/series/Series.rakumod b/exercises/practice/series/lib/Series.rakumod similarity index 67% rename from exercises/practice/series/Series.rakumod rename to exercises/practice/series/lib/Series.rakumod index 5568eefb..5eb29e25 100644 --- a/exercises/practice/series/Series.rakumod +++ b/exercises/practice/series/lib/Series.rakumod @@ -1,2 +1,4 @@ +unit module Series; + sub series ($string, $length) is export { } diff --git a/exercises/practice/series/series.rakutest b/exercises/practice/series/t/series.rakutest similarity index 98% rename from exercises/practice/series/series.rakutest rename to exercises/practice/series/t/series.rakutest index 0a600276..b9645001 100755 --- a/exercises/practice/series/series.rakutest +++ b/exercises/practice/series/t/series.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Series; cmp-ok( # begin: 7ae7a46a-d992-4c2a-9c15-a112d125ebad diff --git a/exercises/practice/sieve/.meta/config.json b/exercises/practice/sieve/.meta/config.json index 0d909a6e..22a61d44 100644 --- a/exercises/practice/sieve/.meta/config.json +++ b/exercises/practice/sieve/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Sieve.rakumod" + "lib/Sieve.rakumod" ], "test": [ - "sieve.rakutest" + "t/sieve.rakutest" ], "example": [ - ".meta/solutions/Sieve.rakumod" + ".meta/solutions/lib/Sieve.rakumod" ] }, "blurb": "Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.", diff --git a/exercises/practice/sieve/.meta/solutions/Sieve.rakumod b/exercises/practice/sieve/.meta/solutions/lib/Sieve.rakumod similarity index 100% rename from exercises/practice/sieve/.meta/solutions/Sieve.rakumod rename to exercises/practice/sieve/.meta/solutions/lib/Sieve.rakumod diff --git a/exercises/practice/sieve/.meta/solutions/sieve.rakutest b/exercises/practice/sieve/.meta/solutions/sieve.rakutest deleted file mode 120000 index cc3f40db..00000000 --- a/exercises/practice/sieve/.meta/solutions/sieve.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../sieve.rakutest \ No newline at end of file diff --git a/exercises/practice/sieve/.meta/solutions/t/sieve.rakutest b/exercises/practice/sieve/.meta/solutions/t/sieve.rakutest new file mode 120000 index 00000000..8e409150 --- /dev/null +++ b/exercises/practice/sieve/.meta/solutions/t/sieve.rakutest @@ -0,0 +1 @@ +../../../t/sieve.rakutest \ No newline at end of file diff --git a/exercises/practice/sieve/Sieve.rakumod b/exercises/practice/sieve/lib/Sieve.rakumod similarity index 100% rename from exercises/practice/sieve/Sieve.rakumod rename to exercises/practice/sieve/lib/Sieve.rakumod diff --git a/exercises/practice/sieve/sieve.rakutest b/exercises/practice/sieve/t/sieve.rakutest similarity index 97% rename from exercises/practice/sieve/sieve.rakutest rename to exercises/practice/sieve/t/sieve.rakutest index cbf3c048..f11d9d4c 100755 --- a/exercises/practice/sieve/sieve.rakutest +++ b/exercises/practice/sieve/t/sieve.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Sieve; cmp-ok( # begin: 88529125-c4ce-43cc-bb36-1eb4ddd7b44f diff --git a/exercises/practice/space-age/.meta/config.json b/exercises/practice/space-age/.meta/config.json index 13389b56..2e926fb0 100644 --- a/exercises/practice/space-age/.meta/config.json +++ b/exercises/practice/space-age/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "SpaceAge.rakumod" + "lib/SpaceAge.rakumod" ], "test": [ - "space-age.rakutest" + "t/space-age.rakutest" ], "example": [ - ".meta/solutions/SpaceAge.rakumod" + ".meta/solutions/lib/SpaceAge.rakumod" ] }, "blurb": "Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.", diff --git a/exercises/practice/space-age/.meta/solutions/SpaceAge.rakumod b/exercises/practice/space-age/.meta/solutions/lib/SpaceAge.rakumod similarity index 100% rename from exercises/practice/space-age/.meta/solutions/SpaceAge.rakumod rename to exercises/practice/space-age/.meta/solutions/lib/SpaceAge.rakumod diff --git a/exercises/practice/space-age/.meta/solutions/space-age.rakutest b/exercises/practice/space-age/.meta/solutions/space-age.rakutest deleted file mode 120000 index 2928ee67..00000000 --- a/exercises/practice/space-age/.meta/solutions/space-age.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../space-age.rakutest \ No newline at end of file diff --git a/exercises/practice/space-age/.meta/solutions/t/space-age.rakutest b/exercises/practice/space-age/.meta/solutions/t/space-age.rakutest new file mode 120000 index 00000000..70c43975 --- /dev/null +++ b/exercises/practice/space-age/.meta/solutions/t/space-age.rakutest @@ -0,0 +1 @@ +../../../t/space-age.rakutest \ No newline at end of file diff --git a/exercises/practice/space-age/SpaceAge.rakumod b/exercises/practice/space-age/lib/SpaceAge.rakumod similarity index 100% rename from exercises/practice/space-age/SpaceAge.rakumod rename to exercises/practice/space-age/lib/SpaceAge.rakumod diff --git a/exercises/practice/space-age/space-age.rakutest b/exercises/practice/space-age/t/space-age.rakutest similarity index 97% rename from exercises/practice/space-age/space-age.rakutest rename to exercises/practice/space-age/t/space-age.rakutest index e7b7ac3f..f0e75036 100755 --- a/exercises/practice/space-age/space-age.rakutest +++ b/exercises/practice/space-age/t/space-age.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use SpaceAge; cmp-ok( # begin: 84f609af-5a91-4d68-90a3-9e32d8a5cd34 diff --git a/exercises/practice/square-root/.meta/config.json b/exercises/practice/square-root/.meta/config.json index 3777d4d2..9f93462a 100644 --- a/exercises/practice/square-root/.meta/config.json +++ b/exercises/practice/square-root/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "SquareRoot.rakumod" + "lib/SquareRoot.rakumod" ], "test": [ - "square-root.rakutest" + "t/square-root.rakutest" ], "example": [ - ".meta/solutions/SquareRoot.rakumod" + ".meta/solutions/lib/SquareRoot.rakumod" ] }, "blurb": "Given a natural radicand, return its square root.", diff --git a/exercises/practice/square-root/.meta/solutions/SquareRoot.rakumod b/exercises/practice/square-root/.meta/solutions/lib/SquareRoot.rakumod similarity index 100% rename from exercises/practice/square-root/.meta/solutions/SquareRoot.rakumod rename to exercises/practice/square-root/.meta/solutions/lib/SquareRoot.rakumod diff --git a/exercises/practice/square-root/.meta/solutions/square-root.rakutest b/exercises/practice/square-root/.meta/solutions/square-root.rakutest deleted file mode 120000 index 45b7a9ad..00000000 --- a/exercises/practice/square-root/.meta/solutions/square-root.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../square-root.rakutest \ No newline at end of file diff --git a/exercises/practice/square-root/.meta/solutions/t/square-root.rakutest b/exercises/practice/square-root/.meta/solutions/t/square-root.rakutest new file mode 120000 index 00000000..98075e04 --- /dev/null +++ b/exercises/practice/square-root/.meta/solutions/t/square-root.rakutest @@ -0,0 +1 @@ +../../../t/square-root.rakutest \ No newline at end of file diff --git a/exercises/practice/square-root/SquareRoot.rakumod b/exercises/practice/square-root/lib/SquareRoot.rakumod similarity index 100% rename from exercises/practice/square-root/SquareRoot.rakumod rename to exercises/practice/square-root/lib/SquareRoot.rakumod diff --git a/exercises/practice/square-root/square-root.rakutest b/exercises/practice/square-root/t/square-root.rakutest similarity index 96% rename from exercises/practice/square-root/square-root.rakutest rename to exercises/practice/square-root/t/square-root.rakutest index 8fdc8dd3..67aa11d4 100755 --- a/exercises/practice/square-root/square-root.rakutest +++ b/exercises/practice/square-root/t/square-root.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use SquareRoot; for Num, Complex, FatRat, Rat, Int { diff --git a/exercises/practice/strain/.meta/config.json b/exercises/practice/strain/.meta/config.json index c460d00b..615a00ff 100644 --- a/exercises/practice/strain/.meta/config.json +++ b/exercises/practice/strain/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Strain.rakumod" + "lib/Strain.rakumod" ], "test": [ - "strain.rakutest" + "t/strain.rakutest" ], "example": [ - ".meta/solutions/Strain.rakumod" + ".meta/solutions/lib/Strain.rakumod" ] }, "blurb": "Implement the `keep` and `discard` operation on collections. Given a collection and a predicate on the collection's elements, `keep` returns a new collection containing those elements where the predicate is true, while `discard` returns a new collection containing those elements where the predicate is false.", diff --git a/exercises/practice/strain/.meta/solutions/Strain.rakumod b/exercises/practice/strain/.meta/solutions/lib/Strain.rakumod similarity index 100% rename from exercises/practice/strain/.meta/solutions/Strain.rakumod rename to exercises/practice/strain/.meta/solutions/lib/Strain.rakumod diff --git a/exercises/practice/strain/.meta/solutions/strain.rakutest b/exercises/practice/strain/.meta/solutions/strain.rakutest deleted file mode 120000 index b0dc82cd..00000000 --- a/exercises/practice/strain/.meta/solutions/strain.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../strain.rakutest \ No newline at end of file diff --git a/exercises/practice/strain/.meta/solutions/t/strain.rakutest b/exercises/practice/strain/.meta/solutions/t/strain.rakutest new file mode 120000 index 00000000..95d97287 --- /dev/null +++ b/exercises/practice/strain/.meta/solutions/t/strain.rakutest @@ -0,0 +1 @@ +../../../t/strain.rakutest \ No newline at end of file diff --git a/exercises/practice/strain/Strain.rakumod b/exercises/practice/strain/lib/Strain.rakumod similarity index 100% rename from exercises/practice/strain/Strain.rakumod rename to exercises/practice/strain/lib/Strain.rakumod diff --git a/exercises/practice/strain/strain.rakutest b/exercises/practice/strain/t/strain.rakutest similarity index 98% rename from exercises/practice/strain/strain.rakutest rename to exercises/practice/strain/t/strain.rakutest index 4c3d5b7f..3ad02034 100755 --- a/exercises/practice/strain/strain.rakutest +++ b/exercises/practice/strain/t/strain.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Strain; cmp-ok( # begin: 26af8c32-ba6a-4eb3-aa0a-ebd8f136e003 diff --git a/exercises/practice/sublist/.meta/config.json b/exercises/practice/sublist/.meta/config.json index d1ec6892..2bfc3874 100644 --- a/exercises/practice/sublist/.meta/config.json +++ b/exercises/practice/sublist/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Sublist.rakumod" + "lib/Sublist.rakumod" ], "test": [ - "sublist.rakutest" + "t/sublist.rakutest" ], "example": [ - ".meta/solutions/Sublist.rakumod" + ".meta/solutions/lib/Sublist.rakumod" ] }, "blurb": "Write a function to determine if a list is a sublist of another list." diff --git a/exercises/practice/sublist/.meta/solutions/Sublist.rakumod b/exercises/practice/sublist/.meta/solutions/lib/Sublist.rakumod similarity index 100% rename from exercises/practice/sublist/.meta/solutions/Sublist.rakumod rename to exercises/practice/sublist/.meta/solutions/lib/Sublist.rakumod diff --git a/exercises/practice/sublist/.meta/solutions/sublist.rakutest b/exercises/practice/sublist/.meta/solutions/sublist.rakutest deleted file mode 120000 index 57c5b3e0..00000000 --- a/exercises/practice/sublist/.meta/solutions/sublist.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../sublist.rakutest \ No newline at end of file diff --git a/exercises/practice/sublist/.meta/solutions/t/sublist.rakutest b/exercises/practice/sublist/.meta/solutions/t/sublist.rakutest new file mode 120000 index 00000000..b7851742 --- /dev/null +++ b/exercises/practice/sublist/.meta/solutions/t/sublist.rakutest @@ -0,0 +1 @@ +../../../t/sublist.rakutest \ No newline at end of file diff --git a/exercises/practice/sublist/Sublist.rakumod b/exercises/practice/sublist/lib/Sublist.rakumod similarity index 100% rename from exercises/practice/sublist/Sublist.rakumod rename to exercises/practice/sublist/lib/Sublist.rakumod diff --git a/exercises/practice/sublist/sublist.rakutest b/exercises/practice/sublist/t/sublist.rakutest similarity index 98% rename from exercises/practice/sublist/sublist.rakutest rename to exercises/practice/sublist/t/sublist.rakutest index 1d9eede8..c47bbba4 100755 --- a/exercises/practice/sublist/sublist.rakutest +++ b/exercises/practice/sublist/t/sublist.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Sublist; cmp-ok( # begin: 97319c93-ebc5-47ab-a022-02a1980e1d29 diff --git a/exercises/practice/sum-of-multiples/.meta/config.json b/exercises/practice/sum-of-multiples/.meta/config.json index c548ecf5..42d4e08b 100644 --- a/exercises/practice/sum-of-multiples/.meta/config.json +++ b/exercises/practice/sum-of-multiples/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "SumOfMultiples.rakumod" + "lib/SumOfMultiples.rakumod" ], "test": [ - "sum-of-multiples.rakutest" + "t/sum-of-multiples.rakutest" ], "example": [ - ".meta/solutions/SumOfMultiples.rakumod" + ".meta/solutions/lib/SumOfMultiples.rakumod" ] }, "blurb": "Given a number, find the sum of all the multiples of particular numbers up to but not including that number.", diff --git a/exercises/practice/sum-of-multiples/.meta/solutions/SumOfMultiples.rakumod b/exercises/practice/sum-of-multiples/.meta/solutions/lib/SumOfMultiples.rakumod similarity index 80% rename from exercises/practice/sum-of-multiples/.meta/solutions/SumOfMultiples.rakumod rename to exercises/practice/sum-of-multiples/.meta/solutions/lib/SumOfMultiples.rakumod index 68e65d28..f37bfffa 100644 --- a/exercises/practice/sum-of-multiples/.meta/solutions/SumOfMultiples.rakumod +++ b/exercises/practice/sum-of-multiples/.meta/solutions/lib/SumOfMultiples.rakumod @@ -1,3 +1,5 @@ +unit module SumOfMultiples; + sub sum-of-multiples (:@factors, :$limit) is export { sum grep * %% @factors.grep( 1 .. * ).any, 1 ..^ $limit } diff --git a/exercises/practice/sum-of-multiples/.meta/solutions/sum-of-multiples.rakutest b/exercises/practice/sum-of-multiples/.meta/solutions/sum-of-multiples.rakutest deleted file mode 120000 index c10bdf0d..00000000 --- a/exercises/practice/sum-of-multiples/.meta/solutions/sum-of-multiples.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../sum-of-multiples.rakutest \ No newline at end of file diff --git a/exercises/practice/sum-of-multiples/.meta/solutions/t/sum-of-multiples.rakutest b/exercises/practice/sum-of-multiples/.meta/solutions/t/sum-of-multiples.rakutest new file mode 120000 index 00000000..3d561fd1 --- /dev/null +++ b/exercises/practice/sum-of-multiples/.meta/solutions/t/sum-of-multiples.rakutest @@ -0,0 +1 @@ +../../../t/sum-of-multiples.rakutest \ No newline at end of file diff --git a/exercises/practice/sum-of-multiples/SumOfMultiples.rakumod b/exercises/practice/sum-of-multiples/lib/SumOfMultiples.rakumod similarity index 65% rename from exercises/practice/sum-of-multiples/SumOfMultiples.rakumod rename to exercises/practice/sum-of-multiples/lib/SumOfMultiples.rakumod index 6a01084b..d4cea2b4 100644 --- a/exercises/practice/sum-of-multiples/SumOfMultiples.rakumod +++ b/exercises/practice/sum-of-multiples/lib/SumOfMultiples.rakumod @@ -1,2 +1,4 @@ +unit module SumOfMultiples; + sub sum-of-multiples (:@factors, :$limit) is export { } diff --git a/exercises/practice/sum-of-multiples/sum-of-multiples.rakutest b/exercises/practice/sum-of-multiples/t/sum-of-multiples.rakutest similarity index 98% rename from exercises/practice/sum-of-multiples/sum-of-multiples.rakutest rename to exercises/practice/sum-of-multiples/t/sum-of-multiples.rakutest index 2d94584a..712cbfbc 100755 --- a/exercises/practice/sum-of-multiples/sum-of-multiples.rakutest +++ b/exercises/practice/sum-of-multiples/t/sum-of-multiples.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use SumOfMultiples; cmp-ok( # begin: 54aaab5a-ce86-4edc-8b40-d3ab2400a279 diff --git a/exercises/practice/transpose/.meta/config.json b/exercises/practice/transpose/.meta/config.json index c16c419d..49d25a4e 100644 --- a/exercises/practice/transpose/.meta/config.json +++ b/exercises/practice/transpose/.meta/config.json @@ -5,13 +5,13 @@ ], "files": { "solution": [ - "Transpose.rakumod" + "lib/Transpose.rakumod" ], "test": [ - "transpose.rakutest" + "t/transpose.rakutest" ], "example": [ - ".meta/solutions/Transpose.rakumod" + ".meta/solutions/lib/Transpose.rakumod" ] }, "blurb": "Take input text and output it transposed.", diff --git a/exercises/practice/transpose/.meta/solutions/Transpose.rakumod b/exercises/practice/transpose/.meta/solutions/lib/Transpose.rakumod similarity index 100% rename from exercises/practice/transpose/.meta/solutions/Transpose.rakumod rename to exercises/practice/transpose/.meta/solutions/lib/Transpose.rakumod diff --git a/exercises/practice/transpose/.meta/solutions/t/transpose.rakutest b/exercises/practice/transpose/.meta/solutions/t/transpose.rakutest new file mode 120000 index 00000000..02c1bd7b --- /dev/null +++ b/exercises/practice/transpose/.meta/solutions/t/transpose.rakutest @@ -0,0 +1 @@ +../../../t/transpose.rakutest \ No newline at end of file diff --git a/exercises/practice/transpose/.meta/solutions/transpose.rakutest b/exercises/practice/transpose/.meta/solutions/transpose.rakutest deleted file mode 120000 index f8e77f49..00000000 --- a/exercises/practice/transpose/.meta/solutions/transpose.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../transpose.rakutest \ No newline at end of file diff --git a/exercises/practice/transpose/Transpose.rakumod b/exercises/practice/transpose/lib/Transpose.rakumod similarity index 100% rename from exercises/practice/transpose/Transpose.rakumod rename to exercises/practice/transpose/lib/Transpose.rakumod diff --git a/exercises/practice/transpose/transpose.rakutest b/exercises/practice/transpose/t/transpose.rakutest similarity index 98% rename from exercises/practice/transpose/transpose.rakutest rename to exercises/practice/transpose/t/transpose.rakutest index e1ec4fcf..b9b49e67 100755 --- a/exercises/practice/transpose/transpose.rakutest +++ b/exercises/practice/transpose/t/transpose.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Transpose; cmp-ok( # begin: 404b7262-c050-4df0-a2a2-0cb06cd6a821 diff --git a/exercises/practice/triangle/.meta/config.json b/exercises/practice/triangle/.meta/config.json index ad14faf6..4654f8ce 100644 --- a/exercises/practice/triangle/.meta/config.json +++ b/exercises/practice/triangle/.meta/config.json @@ -4,13 +4,13 @@ ], "files": { "solution": [ - "Triangle.rakumod" + "lib/Triangle.rakumod" ], "test": [ - "triangle.rakutest" + "t/triangle.rakutest" ], "example": [ - ".meta/solutions/Triangle.rakumod" + ".meta/solutions/lib/Triangle.rakumod" ] }, "blurb": "Determine if a triangle is equilateral, isosceles, or scalene.", diff --git a/exercises/practice/triangle/.meta/solutions/Triangle.rakumod b/exercises/practice/triangle/.meta/solutions/lib/Triangle.rakumod similarity index 100% rename from exercises/practice/triangle/.meta/solutions/Triangle.rakumod rename to exercises/practice/triangle/.meta/solutions/lib/Triangle.rakumod diff --git a/exercises/practice/triangle/.meta/solutions/t/triangle.rakutest b/exercises/practice/triangle/.meta/solutions/t/triangle.rakutest new file mode 120000 index 00000000..47e6fb99 --- /dev/null +++ b/exercises/practice/triangle/.meta/solutions/t/triangle.rakutest @@ -0,0 +1 @@ +../../../t/triangle.rakutest \ No newline at end of file diff --git a/exercises/practice/triangle/.meta/solutions/triangle.rakutest b/exercises/practice/triangle/.meta/solutions/triangle.rakutest deleted file mode 120000 index 19bf053c..00000000 --- a/exercises/practice/triangle/.meta/solutions/triangle.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../triangle.rakutest \ No newline at end of file diff --git a/exercises/practice/triangle/Triangle.rakumod b/exercises/practice/triangle/lib/Triangle.rakumod similarity index 100% rename from exercises/practice/triangle/Triangle.rakumod rename to exercises/practice/triangle/lib/Triangle.rakumod diff --git a/exercises/practice/triangle/triangle.rakutest b/exercises/practice/triangle/t/triangle.rakutest similarity index 99% rename from exercises/practice/triangle/triangle.rakutest rename to exercises/practice/triangle/t/triangle.rakutest index b465ed74..623f0687 100755 --- a/exercises/practice/triangle/triangle.rakutest +++ b/exercises/practice/triangle/t/triangle.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Triangle; cmp-ok( # begin: 8b2c43ac-7257-43f9-b552-7631a91988af diff --git a/exercises/practice/two-fer/.meta/config.json b/exercises/practice/two-fer/.meta/config.json index a8638dfd..1ac07618 100644 --- a/exercises/practice/two-fer/.meta/config.json +++ b/exercises/practice/two-fer/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "TwoFer.rakumod" + "lib/TwoFer.rakumod" ], "test": [ - "two-fer.rakutest" + "t/two-fer.rakutest" ], "example": [ - ".meta/solutions/TwoFer.rakumod" + ".meta/solutions/lib/TwoFer.rakumod" ] }, "blurb": "Create a sentence of the form \"One for X, one for me.\".", diff --git a/exercises/practice/two-fer/.meta/solutions/TwoFer.rakumod b/exercises/practice/two-fer/.meta/solutions/lib/TwoFer.rakumod similarity index 100% rename from exercises/practice/two-fer/.meta/solutions/TwoFer.rakumod rename to exercises/practice/two-fer/.meta/solutions/lib/TwoFer.rakumod diff --git a/exercises/practice/two-fer/.meta/solutions/t/two-fer.rakutest b/exercises/practice/two-fer/.meta/solutions/t/two-fer.rakutest new file mode 120000 index 00000000..a03d6f84 --- /dev/null +++ b/exercises/practice/two-fer/.meta/solutions/t/two-fer.rakutest @@ -0,0 +1 @@ +../../../t/two-fer.rakutest \ No newline at end of file diff --git a/exercises/practice/two-fer/.meta/solutions/two-fer.rakutest b/exercises/practice/two-fer/.meta/solutions/two-fer.rakutest deleted file mode 120000 index c716c9db..00000000 --- a/exercises/practice/two-fer/.meta/solutions/two-fer.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../two-fer.rakutest \ No newline at end of file diff --git a/exercises/practice/two-fer/TwoFer.rakumod b/exercises/practice/two-fer/lib/TwoFer.rakumod similarity index 100% rename from exercises/practice/two-fer/TwoFer.rakumod rename to exercises/practice/two-fer/lib/TwoFer.rakumod diff --git a/exercises/practice/two-fer/two-fer.rakutest b/exercises/practice/two-fer/t/two-fer.rakutest similarity index 84% rename from exercises/practice/two-fer/two-fer.rakutest rename to exercises/practice/two-fer/t/two-fer.rakutest index 8ba6fc8a..b6b64676 100755 --- a/exercises/practice/two-fer/two-fer.rakutest +++ b/exercises/practice/two-fer/t/two-fer.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; #`[Look for the module inside the same directory as this test file.] +use lib $?FILE.IO.parent(2).add('lib'); #`[Look for the module inside the same directory as this test file.] use TwoFer; cmp-ok( # begin: 1cf3e15a-a3d7-4a87-aeb3-ba1b43bc8dce diff --git a/exercises/practice/word-count/.meta/config.json b/exercises/practice/word-count/.meta/config.json index e605e36e..7c391bfe 100644 --- a/exercises/practice/word-count/.meta/config.json +++ b/exercises/practice/word-count/.meta/config.json @@ -11,13 +11,13 @@ ], "files": { "solution": [ - "WordCount.rakumod" + "lib/WordCount.rakumod" ], "test": [ - "word-count.rakutest" + "t/word-count.rakutest" ], "example": [ - ".meta/solutions/WordCount.rakumod" + ".meta/solutions/lib/WordCount.rakumod" ] }, "blurb": "Given a phrase, count the occurrences of each word in that phrase.", diff --git a/exercises/practice/word-count/.meta/solutions/WordCount.rakumod b/exercises/practice/word-count/.meta/solutions/lib/WordCount.rakumod similarity index 100% rename from exercises/practice/word-count/.meta/solutions/WordCount.rakumod rename to exercises/practice/word-count/.meta/solutions/lib/WordCount.rakumod diff --git a/exercises/practice/word-count/.meta/solutions/t/word-count.rakutest b/exercises/practice/word-count/.meta/solutions/t/word-count.rakutest new file mode 120000 index 00000000..896827ef --- /dev/null +++ b/exercises/practice/word-count/.meta/solutions/t/word-count.rakutest @@ -0,0 +1 @@ +../../../t/word-count.rakutest \ No newline at end of file diff --git a/exercises/practice/word-count/.meta/solutions/word-count.rakutest b/exercises/practice/word-count/.meta/solutions/word-count.rakutest deleted file mode 120000 index 7a5ed6ae..00000000 --- a/exercises/practice/word-count/.meta/solutions/word-count.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../word-count.rakutest \ No newline at end of file diff --git a/exercises/practice/word-count/WordCount.rakumod b/exercises/practice/word-count/lib/WordCount.rakumod similarity index 100% rename from exercises/practice/word-count/WordCount.rakumod rename to exercises/practice/word-count/lib/WordCount.rakumod diff --git a/exercises/practice/word-count/word-count.rakutest b/exercises/practice/word-count/t/word-count.rakutest similarity index 98% rename from exercises/practice/word-count/word-count.rakutest rename to exercises/practice/word-count/t/word-count.rakutest index 8cce14ff..3edb198d 100755 --- a/exercises/practice/word-count/word-count.rakutest +++ b/exercises/practice/word-count/t/word-count.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use WordCount; cmp-ok( # begin: 61559d5f-2cad-48fb-af53-d3973a9ee9ef diff --git a/exercises/practice/wordy/.meta/config.json b/exercises/practice/wordy/.meta/config.json index 2fb70c68..dbc11b89 100644 --- a/exercises/practice/wordy/.meta/config.json +++ b/exercises/practice/wordy/.meta/config.json @@ -8,13 +8,13 @@ ], "files": { "solution": [ - "Wordy.rakumod" + "lib/Wordy.rakumod" ], "test": [ - "wordy.rakutest" + "t/wordy.rakutest" ], "example": [ - ".meta/solutions/Wordy.rakumod" + ".meta/solutions/lib/Wordy.rakumod" ] }, "blurb": "Parse and evaluate simple math word problems returning the answer as an integer.", diff --git a/exercises/practice/wordy/.meta/solutions/Wordy.rakumod b/exercises/practice/wordy/.meta/solutions/lib/Wordy.rakumod similarity index 100% rename from exercises/practice/wordy/.meta/solutions/Wordy.rakumod rename to exercises/practice/wordy/.meta/solutions/lib/Wordy.rakumod diff --git a/exercises/practice/wordy/.meta/solutions/t/wordy.rakutest b/exercises/practice/wordy/.meta/solutions/t/wordy.rakutest new file mode 120000 index 00000000..174a74e0 --- /dev/null +++ b/exercises/practice/wordy/.meta/solutions/t/wordy.rakutest @@ -0,0 +1 @@ +../../../t/wordy.rakutest \ No newline at end of file diff --git a/exercises/practice/wordy/.meta/solutions/wordy.rakutest b/exercises/practice/wordy/.meta/solutions/wordy.rakutest deleted file mode 120000 index ddad7b4f..00000000 --- a/exercises/practice/wordy/.meta/solutions/wordy.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../wordy.rakutest \ No newline at end of file diff --git a/exercises/practice/wordy/Wordy.rakumod b/exercises/practice/wordy/lib/Wordy.rakumod similarity index 100% rename from exercises/practice/wordy/Wordy.rakumod rename to exercises/practice/wordy/lib/Wordy.rakumod diff --git a/exercises/practice/wordy/wordy.rakutest b/exercises/practice/wordy/t/wordy.rakutest similarity index 99% rename from exercises/practice/wordy/wordy.rakutest rename to exercises/practice/wordy/t/wordy.rakutest index f9fbf990..cc32a7f3 100755 --- a/exercises/practice/wordy/wordy.rakutest +++ b/exercises/practice/wordy/t/wordy.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Wordy; cmp-ok( # begin: 88bf4b28-0de3-4883-93c7-db1b14aa806e diff --git a/exercises/practice/yacht/.meta/config.json b/exercises/practice/yacht/.meta/config.json index f032e2cc..5722fae7 100644 --- a/exercises/practice/yacht/.meta/config.json +++ b/exercises/practice/yacht/.meta/config.json @@ -7,13 +7,13 @@ ], "files": { "solution": [ - "Yacht.rakumod" + "lib/Yacht.rakumod" ], "test": [ - "yacht.rakutest" + "t/yacht.rakutest" ], "example": [ - ".meta/solutions/Yacht.rakumod" + ".meta/solutions/lib/Yacht.rakumod" ] }, "blurb": "Score a single throw of dice in the game Yacht.", diff --git a/exercises/practice/yacht/.meta/solutions/Yacht.rakumod b/exercises/practice/yacht/.meta/solutions/lib/Yacht.rakumod similarity index 100% rename from exercises/practice/yacht/.meta/solutions/Yacht.rakumod rename to exercises/practice/yacht/.meta/solutions/lib/Yacht.rakumod diff --git a/exercises/practice/yacht/.meta/solutions/t/yacht.rakutest b/exercises/practice/yacht/.meta/solutions/t/yacht.rakutest new file mode 120000 index 00000000..44b601bc --- /dev/null +++ b/exercises/practice/yacht/.meta/solutions/t/yacht.rakutest @@ -0,0 +1 @@ +../../../t/yacht.rakutest \ No newline at end of file diff --git a/exercises/practice/yacht/.meta/solutions/yacht.rakutest b/exercises/practice/yacht/.meta/solutions/yacht.rakutest deleted file mode 120000 index b75f8d9a..00000000 --- a/exercises/practice/yacht/.meta/solutions/yacht.rakutest +++ /dev/null @@ -1 +0,0 @@ -../../yacht.rakutest \ No newline at end of file diff --git a/exercises/practice/yacht/Yacht.rakumod b/exercises/practice/yacht/lib/Yacht.rakumod similarity index 100% rename from exercises/practice/yacht/Yacht.rakumod rename to exercises/practice/yacht/lib/Yacht.rakumod diff --git a/exercises/practice/yacht/yacht.rakutest b/exercises/practice/yacht/t/yacht.rakutest similarity index 99% rename from exercises/practice/yacht/yacht.rakutest rename to exercises/practice/yacht/t/yacht.rakutest index f0d87e0e..13ba96d4 100755 --- a/exercises/practice/yacht/yacht.rakutest +++ b/exercises/practice/yacht/t/yacht.rakutest @@ -1,6 +1,6 @@ #!/usr/bin/env raku use Test; -use lib $?FILE.IO.dirname; +use lib $?FILE.IO.parent(2).add('lib'); use Yacht; cmp-ok( # begin: 3060e4a5-4063-4deb-a380-a630b43a84b6 diff --git a/exercises/shared/.docs/tests.md b/exercises/shared/.docs/tests.md index d0986713..6e30e9ac 100644 --- a/exercises/shared/.docs/tests.md +++ b/exercises/shared/.docs/tests.md @@ -1,10 +1,8 @@ # Tests -You can run the test suite for the exercise by executing the appropriate command: - -If the `rakutest` file is contained in the `t/` directory: -`prove6 --lib` - -If the `rakutest` file is in the top-level directory: -`prove6 {exercise-name}.rakutest` +There is a Raku script with the extension `.rakutest` contained in the `t/` directory, which will be used to test your solution. +You can run through the tests by using the command: +```bash +prove6 +``` diff --git a/lib/Exercism/Generator.rakumod b/lib/Exercism/Generator.rakumod index 7f57612f..a7ac6809 100644 --- a/lib/Exercism/Generator.rakumod +++ b/lib/Exercism/Generator.rakumod @@ -139,36 +139,54 @@ method create-files ( --> Nil ) { my $exercise-dir = $base-dir.add("exercises/practice/$.exercise").mkdir; # Test - my $testfile = $exercise-dir.add("$.exercise.rakutest"); + my $testdir = $exercise-dir.add('t'); + if !$testdir.d { + $testdir.mkdir; + } + my $testfile = $testdir.add("$.exercise.rakutest"); $testfile.spurt($.test); $testfile.chmod(0o755); # Stub - $exercise-dir.add("$.package.rakumod").spurt($.stub); + my $stubdir = $exercise-dir.add('lib'); + if !$stubdir.d { + $stubdir.mkdir; + } + $stubdir.add("$.package.rakumod").spurt($.stub); # Examples for $.examples.pairs -> $example { if $example.key eq 'base' { + if !$exercise-dir.add('.meta', 'solutions', 'lib').d { + $exercise-dir.add('.meta', 'solutions', 'lib').mkdir; + } + if !$exercise-dir.add('.meta', 'solutions', 't').d { + $exercise-dir.add('.meta', 'solutions', 't').mkdir; + } ( my $solution-dir = $exercise-dir - .add('.meta/solutions') ) - .mkdir - .add("$.package.rakumod") + .add('.meta', 'solutions') ) + .add('lib', "$.package.rakumod") .spurt($example.value); # This emulates Raku's symlink, which does not yet support non-absolute paths try nqp::symlink( - "../../$_", - nqp::unbox_s( $solution-dir.add($_).absolute ) + "../../../t/$_", + nqp::unbox_s( $solution-dir.add('t', $_).absolute ) ) given $testfile.basename; } else { + if !$exercise-dir.add('.meta', 'solutions', $example.key, 'lib').d { + $exercise-dir.add('.meta', 'solutions', $example.key, 'lib').mkdir; + } + if !$exercise-dir.add('.meta', 'solutions', $example.key, 't').d { + $exercise-dir.add('.meta', 'solutions', $example.key, 't').mkdir; + } ( my $solution-dir = $exercise-dir .add(".meta/solutions/{$example.key}") ) - .mkdir - .add("$.package.rakumod") + .add('lib', "$.package.rakumod") .spurt($example.value); # This emulates Raku's symlink, which does not yet support non-absolute paths try nqp::symlink( - "../../../$_", + "../../../../t/$_", nqp::unbox_s( $solution-dir.add($_).absolute ) ) given $testfile.basename; } diff --git a/t/files/generated-tests.rakutest b/t/files/generated-tests.rakutest index 9610609b..c1ca4155 100644 --- a/t/files/generated-tests.rakutest +++ b/t/files/generated-tests.rakutest @@ -7,7 +7,7 @@ use Exercism::Generator; bail-out unless $Exercism::Generator::ProblemSpecsDir; for $base-dir.add('exercises/practice').dir.sort { if .add('.meta/template-data.yaml') ~~ :f { - is .add("{.basename}.rakutest").slurp, + is .add("t/{.basename}.rakutest").slurp, Exercism::Generator.new( :data( load-yaml(~.add('.meta/template-data.yaml').IO.slurp) ), :exercise(.basename), diff --git a/t/generator/renders.rakutest b/t/generator/renders.rakutest index 639799e8..69bb9222 100644 --- a/t/generator/renders.rakutest +++ b/t/generator/renders.rakutest @@ -9,7 +9,7 @@ subtest 'Rendered test files' => { is .test, q:to/TEST/, 'No data'; #!/usr/bin/env raku use Test; - use lib $?FILE.IO.dirname; + use lib $?FILE.IO.parent(2).add('lib'); use TestExercise; done-testing; @@ -20,7 +20,7 @@ subtest 'Rendered test files' => { is .test, q:to/TEST/, 'A plan'; #!/usr/bin/env raku use Test; - use lib $?FILE.IO.dirname; + use lib $?FILE.IO.parent(2).add('lib'); use TestExercise; plan 1; TEST @@ -30,7 +30,7 @@ subtest 'Rendered test files' => { is .test, q:to/TEST/, 'A test'; #!/usr/bin/env raku use Test; - use lib $?FILE.IO.dirname; + use lib $?FILE.IO.parent(2).add('lib'); use TestExercise; ok True; @@ -44,7 +44,7 @@ subtest 'Rendered test files' => { #!/usr/bin/env raku use Test; use JSON::Fast; - use lib $?FILE.IO.dirname; + use lib $?FILE.IO.parent(2).add('lib'); use TestExercise; my @test-cases = from-json($=pod[*-1].contents).List; @@ -66,7 +66,7 @@ subtest 'Rendered test files' => { #!/usr/bin/env raku use Test; use JSON::Fast; - use lib $?FILE.IO.dirname; + use lib $?FILE.IO.parent(2).add('lib'); use TestExercise; my @test-cases = from-json($=pod[*-1].contents).List; diff --git a/templates/test.mustache b/templates/test.mustache index 26a76ea9..e4278ffe 100644 --- a/templates/test.mustache +++ b/templates/test.mustache @@ -2,7 +2,7 @@ use Test;#`{{#cases}} use JSON::Fast;#`{{/cases}}#`{{#modules}} use #`{{&use}};#`{{/modules}} -use lib $?FILE.IO.dirname;#`{{#lib_comment}} #`[#`{{&lib_comment}}]#`{{/lib_comment}} +use lib $?FILE.IO.parent(2).add('lib');#`{{#lib_comment}} #`[#`{{&lib_comment}}]#`{{/lib_comment}} use #`{{&package}};#`{{#plan}} plan #`{{&plan}};#`{{#plan_comment}} #`[#`{{&plan_comment}}]#`{{/plan_comment}}#`{{/plan}}#`{{#cases}}