[build-path-prefix-map-spec] 22/50: Add some non-UTF-8 test cases
Ximin Luo
infinity0 at debian.org
Fri Mar 10 15:17:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository build-path-prefix-map-spec.
commit cda21d11b5a267ad87bc1a1b95e79bfd262c8d43
Author: Ximin Luo <infinity0 at debian.org>
Date: Mon Jan 30 20:58:53 2017 +0100
Add some non-UTF-8 test cases
---
consume/Makefile | 10 ++++++++++
consume/testcases/pecsplit.0.non-utf8.env | 1 +
.../{pecsplit.0.long-pc.in => pecsplit.0.non-utf8.in} | 1 +
consume/testcases/pecsplit.0.non-utf8.in.ignore-pecsplit.js | 4 ++++
.../{pecsplit.0.short-pc.out => pecsplit.0.non-utf8.out} | 1 +
5 files changed, 17 insertions(+)
diff --git a/consume/Makefile b/consume/Makefile
index 61ae99a..1e44b01 100644
--- a/consume/Makefile
+++ b/consume/Makefile
@@ -37,6 +37,16 @@ check: $(ALL_FORMATS:%=check-%)
# 6 output
check-generic = \
set -x; for i in $(1); do \
+ if test -f "$(T)$(4).in.ignore-$$i"; then \
+ set +x; \
+ printf >&2 "\033[1;31m================================================================\033[0m\n"; \
+ printf >&2 "\033[1;31mvvvv IGNORING $$i for $(4).in because: vvvv\033[0m\n"; \
+ cat >&2 "$(T)$(4).in.ignore-$$i"; \
+ printf >&2 "\033[1;31m^^^^ IGNORING $$i for $(4).in because: ^^^^\033[0m\n"; \
+ printf >&2 "\033[1;31m================================================================\033[0m\n"; \
+ set -x; \
+ continue; \
+ fi; \
./$$i $$(cat $(T)$(4).in) | diff -ru - "$(T)$(4).in" || exit 1; \
tmpout="$(T)$(5).env.tmpout"; \
BUILD_PATH_PREFIX_MAP="$$(cat $(T)$(5).env)" \
diff --git a/consume/testcases/pecsplit.0.non-utf8.env b/consume/testcases/pecsplit.0.non-utf8.env
new file mode 100644
index 0000000..bdfa2a4
--- /dev/null
+++ b/consume/testcases/pecsplit.0.non-utf8.env
@@ -0,0 +1 @@
+/a/b%eyyy=result�:/a=lol%p%:/b%p=foo%p%p:/a/b%eyyy=result�:/a/b%eyyy�=sec%creteh
diff --git a/consume/testcases/pecsplit.0.long-pc.in b/consume/testcases/pecsplit.0.non-utf8.in
similarity index 71%
copy from consume/testcases/pecsplit.0.long-pc.in
copy to consume/testcases/pecsplit.0.non-utf8.in
index d8d7867..efb0300 100644
--- a/consume/testcases/pecsplit.0.long-pc.in
+++ b/consume/testcases/pecsplit.0.non-utf8.in
@@ -1,4 +1,5 @@
/a/d
/b/1234
/b%/1234
+/a/b=yyy�/xxx
/a/b=yyy/xxx
diff --git a/consume/testcases/pecsplit.0.non-utf8.in.ignore-pecsplit.js b/consume/testcases/pecsplit.0.non-utf8.in.ignore-pecsplit.js
new file mode 100644
index 0000000..689c341
--- /dev/null
+++ b/consume/testcases/pecsplit.0.non-utf8.in.ignore-pecsplit.js
@@ -0,0 +1,4 @@
+NodeJS does not provide an easy way to *not* UTF-8-decode process.env or
+process.argv.
+
+(Invalid UTF-8 bytes are all replaced with U+FFFD REPLACEMENT CHARACTER)
diff --git a/consume/testcases/pecsplit.0.short-pc.out b/consume/testcases/pecsplit.0.non-utf8.out
similarity index 77%
copy from consume/testcases/pecsplit.0.short-pc.out
copy to consume/testcases/pecsplit.0.non-utf8.out
index 1ea2a3c..a4ebdc5 100644
--- a/consume/testcases/pecsplit.0.short-pc.out
+++ b/consume/testcases/pecsplit.0.non-utf8.out
@@ -2,3 +2,4 @@ lol%%/d
/b/1234
foo%%/1234
sec:reteh/xxx
+result�/xxx
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/build-path-prefix-map-spec.git
More information about the Reproducible-commits
mailing list