@@ -652,7 +652,7 @@ spec = around_ setup $ do
652652
653653 shell " psa --version" empty >>= \ case
654654 ExitSuccess -> spago [" -v" , " run" ] >>= shouldBeSuccessOutput " run-output.txt"
655- ExitFailure _ -> spago [" -v" , " run" ] >>= shouldBeSuccessOutput " run-output.txt"
655+ ExitFailure _ -> spago [" -v" , " run" ] >>= shouldBeSuccessOutput " run-output.txt"
656656
657657 it " Spago should be able to not use `psa`" $ do
658658
@@ -668,6 +668,30 @@ spec = around_ setup $ do
668668 spago [" build" ] >>= shouldBeSuccess
669669 shellStrictWithErr " echo wut| spago run" empty >>= shouldBeSuccessOutput " spago-run-passthrough.txt"
670670
671+ it " Spago should use exec-args" $ do
672+
673+ spago [" init" ] >>= shouldBeSuccess
674+ cp " ../fixtures/spago-run-args.purs" " src/Main.purs"
675+ spago [" install" , " node-process" ] >>= shouldBeSuccess
676+ spago [" build" ] >>= shouldBeSuccess
677+ spago [" run" , " --exec-args" , " hello world" ] >>= shouldBeSuccessOutput " run-args-output.txt"
678+
679+ it " Spago should use node-args" $ do
680+
681+ spago [" init" ] >>= shouldBeSuccess
682+ cp " ../fixtures/spago-run-args.purs" " src/Main.purs"
683+ spago [" install" , " node-process" ] >>= shouldBeSuccess
684+ spago [" build" ] >>= shouldBeSuccess
685+ spago [" run" , " --node-args" , " hello world" ] >>= shouldBeSuccessOutput " run-args-output.txt"
686+
687+ it " Spago should prefer exec-args" $ do
688+
689+ spago [" init" ] >>= shouldBeSuccess
690+ cp " ../fixtures/spago-run-args.purs" " src/Main.purs"
691+ spago [" install" , " node-process" ] >>= shouldBeSuccess
692+ spago [" build" ] >>= shouldBeSuccess
693+ spago [" run" , " --exec-args" , " hello world" , " --node-args" , " hallo welt" ] >>= shouldBeSuccessOutput " run-args-combined-output.txt"
694+
671695 describe " spago bundle" $ do
672696
673697 it " Spago should fail but should point to the replacement command" $ do
@@ -689,7 +713,7 @@ spec = around_ setup $ do
689713 spago [" bundle-app" , " --to" , " bundle-app-src-map.js" , " --source-maps" ] >>= shouldBeSuccess
690714 checkFixture " bundle-app-src-map.js"
691715 checkFileExist " bundle-app-src-map.js.map"
692-
716+
693717 describe " spago make-module" $ do
694718
695719 it " Spago should fail but should point to the replacement command" $ do
0 commit comments