aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-07-20 22:03:51 -0500
committerRob Landley <rob@landley.net>2020-07-20 22:03:51 -0500
commitde303e914bc3836e74a798deb211bf9b1ee8c325 (patch)
treef71e17b9236c30532512673b28099a60912c95ac /tests
parent3eead7d3ae4ca93c4eda0167e679bd8d5aa1b59b (diff)
downloadtoybox-de303e914bc3836e74a798deb211bf9b1ee8c325.tar.gz
patch fuzz: Always output original file's ' ' context lines, not from hunk.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/patch.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/patch.test b/tests/patch.test
index 42eed937..5cc60014 100755
--- a/tests/patch.test
+++ b/tests/patch.test
@@ -86,3 +86,34 @@ testing "quoted name" "patch > /dev/null && cat 'fruit bat'" \
+hello
'
# todo bork bork2
+
+# We hit a bug, test the bugfix.
+testing "fuzz" "patch > /dev/null && cat input" \
+"blah blah
+ */
+package org.yaml.snakeyaml.representer;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+" "blah blah
+ */
+package org.yaml.snakeyaml.representer;
+
+import java.beans.IntrospectionException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+" "--- a/x/input
++++ b/x/input
+@@ -15,7 +15,6 @@
+ */
+ package org.yaml.snakeyaml.representer;
+
+-import java.beans.IntrospectionException;
+ import java.util.ArrayList;
+ import java.util.Arrays;
+ import java.util.Iterator;
+"