2012-07-06 18:04:28 -07:00
|
|
|
// This test is brittle!
|
2012-05-14 17:43:31 -07:00
|
|
|
// xfail-pretty - the pretty tests lose path information, breaking #include
|
|
|
|
|
2012-05-18 10:00:49 -07:00
|
|
|
mod m1 {
|
|
|
|
mod m2 {
|
2012-07-31 16:53:14 -07:00
|
|
|
fn where_am_i() -> ~str { module_path!{} }
|
2012-05-18 10:00:49 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-14 17:43:31 -07:00
|
|
|
fn main() {
|
2012-07-30 16:01:07 -07: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-13 22:57:48 -07:00
|
|
|
== ~"victory robot 6");
|
|
|
|
|
2012-05-18 10:02:21 -07:00
|
|
|
assert(
|
2012-07-30 16:01:07 -07:00
|
|
|
include_str!{"syntax-extension-source-utils-files/includeme.fragment"}
|
2012-07-13 22:57:48 -07:00
|
|
|
.starts_with(~"/* this is for "));
|
2012-05-18 10:03:27 -07:00
|
|
|
assert(
|
2012-07-30 16:01:07 -07:00
|
|
|
include_bin!{"syntax-extension-source-utils-files/includeme.fragment"}
|
2012-05-18 10:03:27 -07:00
|
|
|
[1] == (42 as u8)); // '*'
|
2012-05-18 10:00:49 -07:00
|
|
|
// The Windows tests are wrapped in an extra module for some reason
|
2012-07-13 22:57:48 -07:00
|
|
|
assert(m1::m2::where_am_i().ends_with(~"m1::m2"));
|
2012-05-14 17:43:31 -07:00
|
|
|
}
|