Skip to content

Commit

Permalink
Update two-fer to pass 'make test'
Browse files Browse the repository at this point in the history
  • Loading branch information
ingydotnet committed Jul 26, 2024
1 parent 4c8245b commit 2e93ab9
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ exercises:
prerequisites: []
difficulty: 1
topics: [strings]
- slug: two-fer
name: Two-Fer
uuid: 0957cb25-13dd-43a0-ab3c-ba452ffa5508
practices: []
prerequisites: []
difficulty: 1

concepts: []

Expand Down
20 changes: 20 additions & 0 deletions exercises/practice/two-fer/.meta/two-fer-test.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env ys-0

require ys::taptest: :all

use: 'two-fer'

test::
- name: no name given
code: two-fer/two-fer(nil)
want: One for you, one for me.

- name: a name given
code: two-fer/two-fer('Alice')
want: One for Alice, one for me.

- name: another name given
code: two-fer/two-fer('Bob')
want: One for Bob, one for me.

done:
6 changes: 6 additions & 0 deletions exercises/practice/two-fer/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SHELL := bash

default:

test:
prove -v *-test.ys

0 comments on commit 2e93ab9

Please sign in to comment.