diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-02-12 18:26:13 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2024-02-12 18:26:13 +0000 |
| commit | 851a9da38f070675c42a6d69c41c47a5d29ee3d0 (patch) | |
| tree | 80a89e03225fbf2b419f1b88b2dcea18b8680d57 /usr.bin/patch/tests | |
| parent | 114ab149e23e11760a2a41a773a786b97980616a (diff) | |
Diffstat (limited to 'usr.bin/patch/tests')
| -rwxr-xr-x | usr.bin/patch/tests/unified_patch_test.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/usr.bin/patch/tests/unified_patch_test.sh b/usr.bin/patch/tests/unified_patch_test.sh index 43b0d8373cfa..7d4b74182c41 100755 --- a/usr.bin/patch/tests/unified_patch_test.sh +++ b/usr.bin/patch/tests/unified_patch_test.sh @@ -141,6 +141,24 @@ file_removal_body() atf_check -o inline:"y\n" cat foo } +atf_test_case plinelen +plinelen_body() +{ + hello="$(jot -b hello -s, 20000 | tee foo.txt)" + cp foo.txt bar.txt + echo "world" >>bar.txt + cat >foo.diff <<EOF +--- foo.txt.orig ++++ foo.txt +@@ -1,1 +1,2 @@ + $hello ++world +EOF + atf_check -o match:"Hunk #1 succeeded" \ + patch <foo.diff + atf_check -o file:bar.txt cat foo.txt +} + atf_init_test_cases() { atf_add_test_case basic @@ -148,4 +166,5 @@ 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 plinelen } |
