Skip to content

Commit 75ec1a0

Browse files
authored
[sublist] Add a Jinja test template (#867)
[no important files changed]
1 parent dd50f06 commit 75ec1a0

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{ header }}
2+
3+
# Lists are ordered and sequential: do not sort or reorder them.
4+
# Lists are given in JSON format.
5+
{% for idx, case in cases %}
6+
@test "{{ case["description"] }}" {
7+
{% if idx == 0 %}# {% endif %}[[ $BATS_RUN_SKIPPED == "true" ]] || skip
8+
run bash {{ solution }} "{{ case["input"]["listOne"] }}" "{{ case["input"]["listTwo"] }}"
9+
assert_success
10+
assert_output "{{ case["expected"] }}"
11+
}
12+
{% endfor %}

exercises/practice/sublist/sublist.bats

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#!/usr/bin/env bats
22
load bats-extra
33

4-
# local version: 1.1.0.0
4+
# generated on 2026-06-29T06:43:40+00:00
5+
# local version: 2.0.0.0
56

67
# Lists are ordered and sequential: do not sort or reorder them.
78
# Lists are given in JSON format.
89

9-
1010
@test "empty lists" {
11-
#[[ $BATS_RUN_SKIPPED == "true" ]] || skip
11+
# [[ $BATS_RUN_SKIPPED == "true" ]] || skip
1212
run bash sublist.sh "[]" "[]"
1313
assert_success
1414
assert_output "equal"

0 commit comments

Comments
 (0)