From 23de678eaab0aa5cb600b079645cababef68a4b5 Mon Sep 17 00:00:00 2001 From: George Sapkin Date: Mon, 8 Jun 2026 16:24:37 +0300 Subject: [PATCH] quickjs: add basic evaluation test Add basic JS evaluation test and move version check to override. Signed-off-by: George Sapkin (cherry picked from commit e38f41afe3950d362816deda441d02c6ba6d6070) Signed-off-by: Josef Schlehofer --- lang/quickjs/test-version.sh | 14 ++++++++++++++ lang/quickjs/test.sh | 10 +++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100755 lang/quickjs/test-version.sh mode change 100644 => 100755 lang/quickjs/test.sh 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