new failing test

This commit is contained in:
anon 2025-01-23 14:07:02 +01:00
parent a9ed9f8854
commit 5f24190b96
3 changed files with 25 additions and 0 deletions

View File

@ -197,3 +197,26 @@ class CMDTEST_mynesteddir < Cmdtest::Testcase
end
end
end
class CMDTEST_myswapdir < Cmdtest::Testcase
def setup
import_file "test/replacer.sh", "./"
import_directory "test/myswapdir/", "./myswapdir/"
end
def test_trailing_slash_included
File.write('target.txt',
[
"000\t./myswapdir/file2.txt",
"002\t./myswapdir/file1.txt"
].join("\n")
)
cmd "EDITOR=./replacer.sh vimdir -n ./myswapdir/" do
exit_zero
created_files ["vimdir_test_file.vimdir"]
removed_files ["target.txt"]
stderr_equal /.+/
end
end
end

1
test/myswapdir/file1.txt Normal file
View File

@ -0,0 +1 @@
this is file 1

1
test/myswapdir/file2.txt Normal file
View File

@ -0,0 +1 @@
this is file 2