Remove 'selector-16' which the macos emoji picker inserts, and handle it being present

This commit is contained in:
2021-12-20 22:48:10 -08:00
parent c06ca5dad2
commit c7e09adba2
10 changed files with 130 additions and 65 deletions

View File

@@ -4,14 +4,60 @@ testDefiningALightningFunctionWorks() {
echo '
#!/usr/bin/env bash
hello() { echo "Hello, World!" ; }
⚡hello() { echo "Hello, World!" ; }
' > go
echo "source $REPO_ROOT/⚡" >> go
echo "source $REPO_ROOT/⚡" >> go
chmod +x go
try ./go hello
assertEquals "Hello, World!" "$STDOUT"
}
testReferingToALightningFunctionWorks() {
echo '
#!/usr/bin/env bash
⚡goodbye() { echo Good Bye.; }
⚡hello() { echo "Hello, World!" ; ⚡goodbye ; }
' > go
echo "source $REPO_ROOT/⚡" >> go
chmod +x go
try ./go hello
assertContains "$STDOUT" "Hello, World!"
assertContains "$STDOUT" "Good Bye."
}
testDefiningALightningFunctionWorksWithSelector16() {
echo '
#!/usr/bin/env bash
hello() { echo "Hello, World!" ; }
' > go
echo "source $REPO_ROOT/⚡" >> go
chmod +x go
try ./go hello
assertEquals "Hello, World!" "$STDOUT"
}
testReferingToALightningFunctionWorksWithSelector16() {
echo '
#!/usr/bin/env bash
goodbye() { echo Good Bye.; }
hello() { echo "Hello, World!" ; ⚡goodbye ; }
' > go
echo "source $REPO_ROOT/⚡" >> go
chmod +x go
try ./go hello
assertContains "$STDOUT" "Hello, World!"
assertContains "$STDOUT" "Good Bye."
}
source $(dirname $0)/runner