exercism / idris

Exercism exercises in Idris.
https://exercism.org/tracks/idris
MIT License
32 stars 18 forks source link

Add bob #143

Closed keiravillekode closed 3 months ago

keiravillekode commented 3 months ago

I "generated" the test file with a messy script that I copy and modify for each language, and then edit for each exercise.

For bob I added lines

            if exercise == 'bob':
                heyBob = input['heyBob'].replace('\n', '\\n').replace('\r', '\\r').replace('\t', '\\t')

                test_file.write(f'  {prefix} test "{description}"{padding} (assertEq (response "{heyBob}") "{expected}")\n')

When we get to exercises with exceptions or multiline input/output, I can adapt it as needed.

isberg commented 3 months ago

@keiravillekode could we have that script commited? It would be nice if we could regenerate tests if we want to improve all assertions to give better feedback. 😀

keiravillekode commented 3 months ago

@keiravillekode could we have that script commited? It would be nice if we could regenerate tests if we want to improve all assertions to give better feedback. 😀

PR for generating bob.