Since all the YAMLScript exercises’ tests can be run by the user using make test I realized I can use different layouts for different exercises.
For simple ones I’ll go with foo.ys and foo-test.ys.
For others I might go with lib/foo.ys and test/foo-1.ys.
I’ll document the possible file layouts and the user will be able to choose any valid layout they want.
The Makefile will recognize the setup and DTRT.
I’m not sure yet what makes the most sense as I’ve only finished 8 simple exercises.
I was thinking that some exercises might have multiple test files but some quick research shows that they all seem to have exactly one test per exercise.
Only these languages have a test directory:
clojure
cpp
dart
elixir
erlang
gleam
haskell
lfe
perl5
purescript
raku
I was also thinking that some exercises might be best solved with multiple source code files. I don’t if that’s the case.
If it’s always one code file and one test file, then yeah I can just go with that.
It feels like currently the main point of exercism is implementing exercises and passing tests. Not so much setting up a real world software project where things would be much different.
Good to know.
I have all the 71 active language repos cloned and I’m writing scripts to find out interesting things like this.
I’ll share some my findings here.