quickjs: add basic evaluation test
authorGeorge Sapkin <redacted>
Mon, 8 Jun 2026 13:24:37 +0000 (16:24 +0300)
committerGeorge Sapkin <redacted>
Mon, 8 Jun 2026 22:19:46 +0000 (01:19 +0300)
Add basic JS evaluation test and move version check to override.

Signed-off-by: George Sapkin <redacted>
lang/quickjs/test-version.sh [new file with mode: 0755]
lang/quickjs/test.sh [changed mode: 0644->0755]

diff --git a/lang/quickjs/test-version.sh b/lang/quickjs/test-version.sh
new file mode 100755 (executable)
index 0000000..43a1b6e
--- /dev/null
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 2154ae5..a24303a
@@ -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
git clone https://git.99rst.org/PROJECT