aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tolnay <dtolnay@gmail.com>2019-08-17 19:47:09 -0700
committerDavid Tolnay <dtolnay@gmail.com>2019-08-17 19:47:09 -0700
commit3179b09c0a36b0d67068dc1bce1f9816940840e0 (patch)
tree0a0a072b91d56f2825cddb14f9ba363f1143547e
parent40b985223063562beaad0c86a07052a004ed8fb6 (diff)
downloadquote-3179b09c0a36b0d67068dc1bce1f9816940840e0.tar.gz
Add regression test for issue 130
-rw-r--r--tests/test.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test.rs b/tests/test.rs
index 6421172..957d470 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -413,3 +413,17 @@ fn test_inner_attr() {
let expected = "# ! [ no_std ]";
assert_eq!(expected, tokens.to_string());
}
+
+// https://github.com/dtolnay/quote/issues/130
+#[test]
+fn test_star_after_repetition() {
+ let c = vec!['0', '1'];
+ let tokens = quote! {
+ #(
+ f(#c);
+ )*
+ *out = None;
+ };
+ let expected = "f ( '0' ) ; f ( '1' ) ; * out = None ;";
+ assert_eq!(expected, tokens.to_string());
+}