2012-07-06 20:04:28 -05:00
|
|
|
// This test is brittle!
|
2012-05-14 19:43:31 -05:00
|
|
|
// xfail-pretty - the pretty tests lose path information, breaking #include
|
|
|
|
|
2012-05-18 12:00:49 -05:00
|
|
|
mod m1 {
|
|
|
|
mod m2 {
|
2012-07-31 18:53:14 -05:00
|
|
|
fn where_am_i() -> ~str { module_path!{} }
|
2012-05-18 12:00:49 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-14 19:43:31 -05:00
|
|
|
fn main() {
|
2012-07-30 18:01:07 -05:00
|
|
|
assert(line!{} == 11u);
|
|
|
|
assert(col!{} == 11u);
|
|
|
|
assert(file!{}.ends_with(~"syntax-extension-source-utils.rs"));
|
|
|
|
assert(stringify!{(2*3) + 5} == ~"2 * 3 + 5");
|
|
|
|
assert(include!{"syntax-extension-source-utils-files/includeme.fragment"}
|
2012-07-14 00:57:48 -05:00
|
|
|
== ~"victory robot 6");
|
|
|
|
|
2012-05-18 12:02:21 -05:00
|
|
|
assert(
|
2012-07-30 18:01:07 -05:00
|
|
|
include_str!{"syntax-extension-source-utils-files/includeme.fragment"}
|
2012-07-14 00:57:48 -05:00
|
|
|
.starts_with(~"/* this is for "));
|
2012-05-18 12:03:27 -05:00
|
|
|
assert(
|
2012-07-30 18:01:07 -05:00
|
|
|
include_bin!{"syntax-extension-source-utils-files/includeme.fragment"}
|
2012-05-18 12:03:27 -05:00
|
|
|
[1] == (42 as u8)); // '*'
|
2012-05-18 12:00:49 -05:00
|
|
|
// The Windows tests are wrapped in an extra module for some reason
|
2012-07-14 00:57:48 -05:00
|
|
|
assert(m1::m2::where_am_i().ends_with(~"m1::m2"));
|
2012-05-14 19:43:31 -05:00
|
|
|
}
|