mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
reftest: Allow free-form comments
This commit is contained in:
parent
f8f17cf475
commit
e70bac19e6
1 changed files with 5 additions and 1 deletions
|
@ -71,6 +71,11 @@ fn parse_lists(filenames: &[~str]) -> ~[TestDescAndFn] {
|
|||
};
|
||||
|
||||
for line in contents.lines() {
|
||||
// ignore comments
|
||||
if line.starts_with("#") {
|
||||
continue;
|
||||
}
|
||||
|
||||
let parts: ~[&str] = line.split(' ').filter(|p| !p.is_empty()).collect();
|
||||
|
||||
if parts.len() != 3 {
|
||||
|
@ -80,7 +85,6 @@ fn parse_lists(filenames: &[~str]) -> ~[TestDescAndFn] {
|
|||
let kind = match parts[0] {
|
||||
"==" => Same,
|
||||
"!=" => Different,
|
||||
"#" => continue,
|
||||
_ => fail!("reftest line: '{:s}' has invalid kind '{:s}'",
|
||||
line, parts[0])
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue