seed: curriculum content
This commit is contained in:
13
1.solar-system/1.welcome/11.the-identity/testing/test.sh
Normal file
13
1.solar-system/1.welcome/11.the-identity/testing/test.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
git init -q -b main
|
||||
|
||||
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; }
|
||||
|
||||
NAME=$(git config --local --get user.name 2>/dev/null)
|
||||
EMAIL=$(git config --local --get user.email 2>/dev/null)
|
||||
|
||||
[ -n "$NAME" ]; report $? "user.name is set on the repo"
|
||||
[[ "$EMAIL" == *@*.* ]]; report $? "user.email is set and looks like an email"
|
||||
Reference in New Issue
Block a user