summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/tests
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-05-07 18:22:04 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-05-07 18:24:56 +0200
commitca35fe181ed578f1fb4047de8dd8ea7595daec0d (patch)
tree7d5edf0babac6a79bf091f3a8b164ca779c4c002 /openpgp-ffi/tests
parent8ed5842580a1c172fc8d5ebe5d0444ee5e011a01 (diff)
openpgp-ffi, ffi: Improve 6911aed9.
- To preserve location information, replace the include.
Diffstat (limited to 'openpgp-ffi/tests')
-rw-r--r--openpgp-ffi/tests/c-tests.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp-ffi/tests/c-tests.rs b/openpgp-ffi/tests/c-tests.rs
index b14ecadb..06ab21a5 100644
--- a/openpgp-ffi/tests/c-tests.rs
+++ b/openpgp-ffi/tests/c-tests.rs
@@ -265,7 +265,9 @@ fn wrap_with_main(test: &mut Vec<String>, offset: usize) {
let needs_wrapping = ! has_main(test);
// Replace glibc-style error handling.
- test.retain(|l| l != "#include <error.h>");
+ test.iter_mut().for_each(|l| {
+ if l == "#include <error.h>" { *l = "".into() }
+ });
let mut last_include = 0;
for (n, line) in test.iter().enumerate() {