mirror of
https://github.com/openwrt/packages.git
synced 2026-06-17 10:30:10 +04:00
quickjs: add basic evaluation test
Add basic JS evaluation test and move version check to override. Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
Executable
+14
@@ -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
|
||||
Regular → Executable
+7
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user