summaryrefslogtreecommitdiffstats
path: root/tests/ui/proc-macro/subspan.rs
blob: a4187f9e7c20cd2e655cf73076cd9acd4f521112 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// aux-build:subspan.rs

extern crate subspan;

use subspan::subspan;

// This one emits no error.
subspan!("");

// Exactly one 'hi'.
subspan!("hi"); //~ ERROR found 'hi's

// Now two, back to back.
subspan!("hihi"); //~ ERROR found 'hi's

// Now three, back to back.
subspan!("hihihi"); //~ ERROR found 'hi's

// Now several, with spacing.
subspan!("why I hide? hi!"); //~ ERROR found 'hi's
subspan!("hey, hi, hidy, hidy, hi hi"); //~ ERROR found 'hi's
subspan!("this is a hi, and this is another hi"); //~ ERROR found 'hi's
subspan!("how are you this evening"); //~ ERROR found 'hi's
subspan!("this is highly eradic"); //~ ERROR found 'hi's

fn main() { }