mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
[ test ] node test for System.getArgs
This commit is contained in:
parent
e293d82577
commit
6f90e5d2e2
@ -249,6 +249,7 @@ nodeTests = MkTestPool "Node backend" [Node]
|
||||
, "node017", "node018", "node019", "node021", "node022", "node023"
|
||||
, "node024", "node025"
|
||||
-- , "node14", "node020"
|
||||
, "args"
|
||||
, "bitops"
|
||||
, "casts"
|
||||
, "newints"
|
||||
|
7
tests/node/args/TestArgs.idr
Normal file
7
tests/node/args/TestArgs.idr
Normal 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
2
tests/node/args/expected
Normal file
@ -0,0 +1,2 @@
|
||||
["a", "b"]
|
||||
["c"]
|
5
tests/node/args/run
Normal file
5
tests/node/args/run
Normal 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
|
Loading…
Reference in New Issue
Block a user