[ test ] node test for System.getArgs

This commit is contained in:
stefan-hoeck 2021-05-25 13:07:46 +02:00 committed by G. Allais
parent e293d82577
commit 6f90e5d2e2
4 changed files with 15 additions and 0 deletions

View File

@ -249,6 +249,7 @@ nodeTests = MkTestPool "Node backend" [Node]
, "node017", "node018", "node019", "node021", "node022", "node023"
, "node024", "node025"
-- , "node14", "node020"
, "args"
, "bitops"
, "casts"
, "newints"

View File

@ -0,0 +1,7 @@
module TestArgs
import Data.List
import System
main : IO ()
main = getArgs >>= (putStrLn . show . drop 2)

2
tests/node/args/expected Normal file
View File

@ -0,0 +1,2 @@
["a", "b"]
["c"]

5
tests/node/args/run Normal file
View File

@ -0,0 +1,5 @@
$1 --no-banner --no-color --console-width 0 --cg node -o node_args TestArgs.idr > /dev/null
node ./build/exec/node_args a b
node ./build/exec/node_args c
rm -rf build