seed: curriculum content
This commit is contained in:
13
1.solar-system/1.welcome/12.the-initiator/testing/test.sh
Normal file
13
1.solar-system/1.welcome/12.the-initiator/testing/test.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
bash solution.sh > /dev/null 2>&1
|
||||
|
||||
N=0
|
||||
report() { N=$((N+1)); if [ "$1" = "0" ]; then echo "ok $N - $2"; else echo "not ok $N - $2"; fi; }
|
||||
|
||||
[ -d .git ]; report $? ".git/ exists"
|
||||
[ -f intro.md ]; report $? "intro.md exists"
|
||||
grep -q "Hello, Git" intro.md 2>/dev/null; report $? "intro.md contains 'Hello, Git'"
|
||||
[ -f status-before.txt ]; report $? "status-before.txt exists"
|
||||
grep -qi "branch" status-before.txt 2>/dev/null; report $? "status-before.txt looks like git status output"
|
||||
[ -f status-after.txt ]; report $? "status-after.txt exists"
|
||||
grep -q "intro.md" status-after.txt 2>/dev/null; report $? "status-after.txt mentions intro.md"
|
||||
Reference in New Issue
Block a user