test editor fail reporting

This commit is contained in:
anon 2025-01-25 11:22:58 +01:00
parent d7b253a52f
commit 525586bf08
2 changed files with 12 additions and 0 deletions

View File

@ -57,6 +57,16 @@ class CMDTEST_basic < Cmdtest::Testcase
created_files ["output.txt"]
end
end
def test_editor_fail
import_file "test/faulty_editor.sh", "./"
cmd "EDITOR=./faulty_editor.sh vimdir -n ./" do
exit_nonzero
created_files ["vimdir_test_file.vimdir"]
stderr_equal /\A.*error.+\n.*notice.+\n/
end
end
end

2
test/faulty_editor.sh Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exit 17