read remaining args to `--new --` as script content
1 file changed, 8 insertions(+), 0 deletions(-)
changed files
M tests/scriptura.fish → tests/scriptura.fish
@@ -91,6 +91,14 @@ touch "$test_root/existing_script" scriptura --new existing_script 2>&1 | string match --regex "already exists" ) +# Test: --new with -- creates script with remaining arguments +@test "--new with -- creates script with remaining arguments" ( + set --global --export SCRIPTURA_ROOT $test_root + scriptura --new new_script -- echo foo + path is --type file --perm exec "$test_root/new_script" + tail -n 1 "$test_root/new_script" +) = "echo foo" + # Test: --which shows path for executable script @test "--which shows path for executable script" ( set --global --export SCRIPTURA_ROOT $test_root