lightning-runner/test/test-sugar

36 lines
513 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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