make --new accept --edit to init script from args and then edit
1 file changed, 9 insertions(+), 0 deletions(-)
changed files
M tests/scriptura.fish → tests/scriptura.fish
@@ -105,6 +105,15 @@ path is --type file --perm exec "$test_root/new_script" tail -n 1 "$test_root/new_script" ) = "echo foo" +# Test: --new --edit with -- creates script with remaining arguments +@test "--new --edit with -- creates script with remaining arguments" ( + set --global --export SCRIPTURA_ROOT $test_root + set --global --export SCRIPTURA_EDITOR "sed -i s/foo/bar/" + scriptura --new --edit new_edit_script -- echo foo + path is --type file --perm exec "$test_root/new_edit_script" + tail -n 1 "$test_root/new_edit_script" +) = "echo bar" + # Test: --which shows path for executable script @test "--which shows path for executable script" ( set --global --export SCRIPTURA_ROOT $test_root