lightning-runner/test/test-sugar

36 lines
513 B
Plaintext
Raw Permalink Normal View History

2021-12-21 04:51:18 +00:00
#!/usr/bin/env bash
testGoodMessageShouldBeGreen() {
echo '
#!/usr/bin/env bash
⚡hello() {
2021-12-21 04:51:18 +00:00
_good-message "hello"
}
' > go
echo "source $REPO_ROOT/⚡" >> go
2021-12-21 04:51:18 +00:00
chmod +x go
try ./go hello
assertEquals "hello" "$STDOUT"
}
testBadMessageShouldBeRed() {
echo '
#!/usr/bin/env bash
⚡hello() {
2021-12-21 04:51:18 +00:00
_bad-message "hello"
}
' > go
echo "source $REPO_ROOT/⚡" >> go
2021-12-21 04:51:18 +00:00
chmod +x go
try ./go hello
assertEquals "hello" "$STDOUT"
}
source $(dirname $0)/runner