From a43d7eb3dd9cb97a81374001a23456bbee008d65 Mon Sep 17 00:00:00 2001 From: varkor Date: Wed, 31 Jan 2018 11:56:15 +0000 Subject: [PATCH] Use file containing non-UTF-8 character instead of echo -e --- src/test/run-make/stdin-non-utf8/Makefile | 3 ++- src/test/run-make/stdin-non-utf8/non-utf8 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 src/test/run-make/stdin-non-utf8/non-utf8 diff --git a/src/test/run-make/stdin-non-utf8/Makefile b/src/test/run-make/stdin-non-utf8/Makefile index f883e546e9c9..7948c442616e 100644 --- a/src/test/run-make/stdin-non-utf8/Makefile +++ b/src/test/run-make/stdin-non-utf8/Makefile @@ -1,5 +1,6 @@ -include ../tools.mk all: - echo -e '\xD2' | $(RUSTC) - 2>&1 \ + cp non-utf8 $(TMPDIR)/non-utf.rs + cat $(TMPDIR)/non-utf.rs | $(RUSTC) - 2>&1 \ | $(CGREP) "error: couldn't read from stdin, as it did not contain valid UTF-8" diff --git a/src/test/run-make/stdin-non-utf8/non-utf8 b/src/test/run-make/stdin-non-utf8/non-utf8 new file mode 100644 index 000000000000..bc87051a8529 --- /dev/null +++ b/src/test/run-make/stdin-non-utf8/non-utf8 @@ -0,0 +1 @@ +Ò