]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/proc-macro/expand-expr.rs
Update src/test/ui/proc-macro/expand-expr.rs
[rust.git] / src / test / ui / proc-macro / expand-expr.rs
index d1146d970306264b1485cfc6f243bd51134a62f4..901b3a951023c3505bbc3d3a952b9cb045765b83 100644 (file)
@@ -1,5 +1,5 @@
 // aux-build:expand-expr.rs
-
+#![feature(concat_bytes)]
 extern crate expand_expr;
 
 use expand_expr::{
     concat!("contents: ", include_str!("auxiliary/included-file.txt"))
 );
 
+expand_expr_is!(
+    b"contents: Included file contents\n",
+    concat_bytes!(b"contents: ", include_bytes!("auxiliary/included-file.txt"))
+);
+
 // Correct value is checked for multiple sources.
 check_expand_expr_file!(file!());
 
@@ -118,4 +123,10 @@ macro_rules! mac {
 
 const _: u32 = recursive_expand!(); //~ ERROR: recursion limit reached while expanding `recursive_expand!`
 
-fn main() {}
+fn main() {
+    // https://github.com/rust-lang/rust/issues/104414
+    match b"Included file contents\n" {
+        include_bytes!("auxiliary/included-file.txt") => (),
+        _ => panic!("include_bytes! in pattern"),
+    }
+}