From 71cd4c8e4af4a05991fef5a61110510c78d90131 Mon Sep 17 00:00:00 2001
From: Patrick McCarter
Date: Sat, 16 Feb 2019 20:56:12 -0500
Subject: [PATCH] ui test for directed quote help suggestion #58436
---
src/test/ui/parser/unicode-quote-chars.rs | 7 +++++++
src/test/ui/parser/unicode-quote-chars.stderr | 12 ++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 src/test/ui/parser/unicode-quote-chars.rs
create mode 100644 src/test/ui/parser/unicode-quote-chars.stderr
diff --git a/src/test/ui/parser/unicode-quote-chars.rs b/src/test/ui/parser/unicode-quote-chars.rs
new file mode 100644
index 00000000000..69644211b8a
--- /dev/null
+++ b/src/test/ui/parser/unicode-quote-chars.rs
@@ -0,0 +1,7 @@
+// ignore-tidy-linelength
+
+fn main() {
+ println!(“hello world”);
+ //~^ ERROR unknown start of token: \u{201c}
+ //~^^ HELP Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not
+}
diff --git a/src/test/ui/parser/unicode-quote-chars.stderr b/src/test/ui/parser/unicode-quote-chars.stderr
new file mode 100644
index 00000000000..315e20cf854
--- /dev/null
+++ b/src/test/ui/parser/unicode-quote-chars.stderr
@@ -0,0 +1,12 @@
+error: unknown start of token: /u{201c}
+ --> $DIR/unicode-quote-chars.rs:4:14
+ |
+LL | println!(“hello world”);
+ | ^
+help: Unicode characters '“' (Left Double Quotation Mark) and '”' (Right Double Quotation Mark) look like '"' (Quotation Mark), but are not
+ |
+LL | println!("hello world");
+ | ^^^^^^^^^^^^^
+
+error: aborting due to previous error
+