diff options
-rw-r--r-- | tests/tests.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/tests.rs b/tests/tests.rs index 85fcc197..9265b021 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -75,8 +75,12 @@ fn create_bindgen_builder(header: &PathBuf) -> Result<Option<Builder>, Error> { // Scoop up bindgen-flags from test header let mut flags = Vec::with_capacity(2); - for line in reader.lines().take(3) { + for line in reader.lines() { let line = try!(line); + if !line.starts_with("// bindgen") { + continue; + } + if line.contains("bindgen-flags: ") { let extra_flags = line.split("bindgen-flags: ") .last() |