diff --git a/lang/quickjs/test-version.sh b/lang/quickjs/test-version.sh new file mode 100755 index 0000000000..43a1b6ef3b --- /dev/null +++ b/lang/quickjs/test-version.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# shellcheck shell=busybox + +case "$PKG_NAME" in +quickjs) + qjs --help | grep -F "${PKG_VERSION//./-}" + ;; + +*) + echo "Untested package: $PKG_NAME" >&2 + exit 1 + ;; +esac diff --git a/lang/quickjs/test.sh b/lang/quickjs/test.sh old mode 100644 new mode 100755 index 2154ae5052..a24303afb9 --- a/lang/quickjs/test.sh +++ b/lang/quickjs/test.sh @@ -1,5 +1,9 @@ #!/bin/sh -if [ "$1" = 'quickjs' ]; then - qjs --help | grep -F "${PKG_VERSION//./-}" -fi +# shellcheck shell=busybox + +case "$PKG_NAME" in +quickjs) + qjs --eval 'console.log(2 ** 8)' | grep 256 + ;; +esac