aboutsummaryrefslogtreecommitdiffstats
path: root/t/null-bytes
diff options
context:
space:
mode:
Diffstat (limited to 't/null-bytes')
-rwxr-xr-xt/null-bytes15
1 files changed, 15 insertions, 0 deletions
diff --git a/t/null-bytes b/t/null-bytes
new file mode 100755
index 0000000..9a7ee7f
--- /dev/null
+++ b/t/null-bytes
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+. t/common.sh
+
+(
+ printf '%s\n' "${HEAD} ours"
+ printf 'same\000text\n'
+ printf '%s\n' "${TAIL}"
+ printf 'same\000text\n'
+ printf '%s\n' "${END} theirs"
+) > file
+
+printf 'same\000text\n' > file.expected
+
+"$command" --reduce file
+cmp -s -- file file.expected