diff options
Diffstat (limited to 'usr.bin/patch/tests/unified_patch_test.sh')
-rwxr-xr-x | usr.bin/patch/tests/unified_patch_test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usr.bin/patch/tests/unified_patch_test.sh b/usr.bin/patch/tests/unified_patch_test.sh index 7d4b74182c41..a91332908773 100755 --- a/usr.bin/patch/tests/unified_patch_test.sh +++ b/usr.bin/patch/tests/unified_patch_test.sh @@ -141,6 +141,23 @@ file_removal_body() atf_check -o inline:"y\n" cat foo } +atf_test_case namespace +namespace_head() +{ + atf_set "descr" "Test that patch(1) handles files with spaces in the name" +} +namespace_body() +{ + echo "ABC" > "with spaces.orig" + echo "ZYX" > "with spaces" + + atf_check -s not-exit:0 -o save:spaces.diff \ + diff -u "with spaces.orig" "with spaces" + + atf_check mv "with spaces.orig" "with spaces" + atf_check -o not-empty patch < spaces.diff +} + atf_test_case plinelen plinelen_body() { @@ -166,5 +183,6 @@ atf_init_test_cases() atf_add_test_case file_creation atf_add_test_case file_nodupe atf_add_test_case file_removal + atf_add_test_case namespace atf_add_test_case plinelen } |