Skip to content

Commit 8c92ea4

Browse files
committed
core: Shuffle around a #fmt test
1 parent 059e243 commit 8c92ea4

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/libcore/extfmt.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,6 @@ mod rt {
453453
}
454454
}
455455

456-
#[cfg(test)]
457-
mod tests {
458-
#[test]
459-
fn test_percent() {
460-
let s = #fmt["ab%%cd"];
461-
assert(s == "ab%cd");
462-
}
463-
}
464-
465456
// Local Variables:
466457
// mode: rust;
467458
// fill-column: 78;

src/test/run-pass/syntax-extension-fmt.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn main() {
2121
part4();
2222
part5();
2323
part6();
24+
percent();
2425
}
2526

2627
fn part1() {
@@ -229,3 +230,8 @@ fn part6() {
229230
test(#fmt["%-+05d", 1], "+1 ");
230231
test(#fmt["%-+05d", -1], "-1 ");
231232
}
233+
234+
fn percent() {
235+
let s = #fmt["ab%%cd"];
236+
assert(s == "ab%cd");
237+
}

0 commit comments

Comments
 (0)