core: Shuffle around a #fmt test
This commit is contained in:
parent
059e243b16
commit
8c92ea49d3
@ -453,15 +453,6 @@ mod rt {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn test_percent() {
|
||||
let s = #fmt["ab%%cd"];
|
||||
assert(s == "ab%cd");
|
||||
}
|
||||
}
|
||||
|
||||
// Local Variables:
|
||||
// mode: rust;
|
||||
// fill-column: 78;
|
||||
|
@ -21,6 +21,7 @@ fn main() {
|
||||
part4();
|
||||
part5();
|
||||
part6();
|
||||
percent();
|
||||
}
|
||||
|
||||
fn part1() {
|
||||
@ -229,3 +230,8 @@ fn part6() {
|
||||
test(#fmt["%-+05d", 1], "+1 ");
|
||||
test(#fmt["%-+05d", -1], "-1 ");
|
||||
}
|
||||
|
||||
fn percent() {
|
||||
let s = #fmt["ab%%cd"];
|
||||
assert(s == "ab%cd");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user