about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEd Page <eopage@gmail.com>2025-08-29 13:30:48 -0500
committerEd Page <eopage@gmail.com>2025-09-01 20:51:30 -0500
commit159be09c4f70b109cc859a55beeb4150b8e452e6 (patch)
treed9bc83b2fa15f467b9257313db1883f814fa9b67
parentb2962c367a7f38a8d6fb372ae4744f77f9079619 (diff)
test(lexer): Ensure frontmatter can contain unicode whitespace
-rw-r--r--tests/ui/frontmatter/frontmatter-contains-whitespace.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/ui/frontmatter/frontmatter-contains-whitespace.rs b/tests/ui/frontmatter/frontmatter-contains-whitespace.rs
new file mode 100644
index 00000000000..11df822f793
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-contains-whitespace.rs
@@ -0,0 +1,22 @@
+#!/usr/bin/env -S cargo -Zscript
+---cargo
+# Beware editing: it has numerous whitespace characters which are important.
+# It contains one ranges from the 'PATTERN_WHITE_SPACE' property outlined in
+# https://unicode.org/Public/UNIDATA/PropList.txt
+#
+# The characters in the first expression of the assertion can be generated
+# from: "4\u{0C}+\n\t\r7\t*\u{20}2\u{85}/\u{200E}3\u{200F}*\u{2028}2\u{2029}"
+package.description = """
+4+
+
+7   * 2…/‎3‏*
2
+"""
+---
+
+//@ check-pass
+
+// Ensure the frontmatter can contain any whitespace
+
+#![feature(frontmatter)]
+
+fn main() {}