+# Test end-of-file matching behavior
+
+testing "sed match EOF" "sed -e '"'$p'"'" "hello\nthere\nthere" "" \
+ "hello\nthere"
+testing "sed match EOF two files" "sed -e '"'$p'"' input -" \
+ "one\ntwo\nthree\nfour\nfour" "one\ntwo" "three\nfour"
+echo -ne "three\nfour" > input2
+testing "sed match EOF inline" \
+ "sed -e '"'$i ook'"' -i input input2 && cat input input2" \
+ "one\nook\ntwothree\nook\nfour" "one\ntwo" ""
+rm input2
+
+# Test lie-to-autoconf
+
+testing "sed lie-to-autoconf" "sed --version | grep -o 'GNU sed version '" \
+ "GNU sed version \n" "" ""
+
+# Jump to nonexistent label
+testing "sed nonexistent label" "sed -e 'b walrus' 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+
+testing "sed backref from empty s uses range regex" \
+ "sed -e '/woot/s//eep \0 eep/'" "eep woot eep" "" "woot"
+
+testing "sed backref from empty s uses range regex with newline" \
+ "sed -e '/woot/s//eep \0 eep/'" "eep woot eep\n" "" "woot\n"
+
+# -i with no filename
+
+touch ./- # Detect gnu failure mode here.
+testing "sed -i with no arg [GNUFAIL]" "sed -e '' -i 2> /dev/null || echo yes" \
+ "yes\n" "" ""
+rm ./- # Clean up
+
+testing "sed s/xxx/[/" "sed -e 's/xxx/[/'" "[\n" "" "xxx\n"
+