roc/crates/cli/tests
Jasper Woudenberg ad555297cf
Set argv[0] to .roc file passed to 'roc run'
When we run `roc run <file>` or `roc <file>` then Roc will compile a
binary and run it. Before this commit we would set the path to the
compiled binary as argv[0]. This commit changes the behavior to make
argv[0] in the binary correspond to the roc file being ran.

This benefits the use of roc scripts that make use of a shebang:

    #!/usr/bin/env roc

With this change such scripts will be able to read the path to
themselves out of ARGV. This trick is commonly used for instance by bash
scripts in order to access files relative to the script itself.
2024-10-21 21:54:46 +02:00
..
algorithms add a test for multiple expose and fix naming 2024-10-07 21:16:30 -07:00
benchmarks basic-cli 0.15, test fixes 2024-08-28 18:39:15 +02:00
cli Set argv[0] to .roc file passed to 'roc run' 2024-10-21 21:54:46 +02:00
expects Remove redundant cli_testing_examples folder 2024-03-05 18:37:03 -05:00
expects_transitive Add test for transitive expects 2024-03-08 14:56:36 -05:00
fixtures Load packages of packages 2024-06-25 21:29:21 -03:00
known_bad Merge attempt 2024-08-19 23:34:05 -07:00
module_imports_pkg Custom reporting for unknown package when checking a module directly 2024-06-08 18:29:30 -03:00
module_params Add failing test for multiline params 2024-09-20 16:19:56 -03:00
multiple_exposed minor formatting fixes 2024-10-07 21:16:30 -07:00
platform_requires_pkg fix test 2024-08-07 08:51:08 +10:00
cli_run.rs Set argv[0] to .roc file passed to 'roc run' 2024-10-21 21:54:46 +02:00