From: George Sapkin Date: Mon, 8 Jun 2026 13:24:37 +0000 (+0300) Subject: quickjs: add basic evaluation test X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=e38f41afe3950d362816deda441d02c6ba6d6070;p=openwrt-packages.git quickjs: add basic evaluation test Add basic JS evaluation test and move version check to override. Signed-off-by: George Sapkin --- diff --git a/lang/quickjs/test-version.sh b/lang/quickjs/test-version.sh new file mode 100755 index 000000000..43a1b6ef3 --- /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 2154ae505..a24303afb --- 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