summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/tests
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-05-07 13:54:35 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-05-07 13:54:35 +0200
commit6911aed99b5a5bd50eecd6864d1106088d4f2de3 (patch)
tree180bb1502f084441d5258782116d6d03a812baa7 /openpgp-ffi/tests
parentb0c3d225a29b33af983cd7da17d1d5a0a780eeb6 (diff)
openpgp-ffi: Remove '#include <error.h>' from doctests.
Diffstat (limited to 'openpgp-ffi/tests')
-rw-r--r--openpgp-ffi/tests/c-tests.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/openpgp-ffi/tests/c-tests.rs b/openpgp-ffi/tests/c-tests.rs
index 6a2d04e0..050198f5 100644
--- a/openpgp-ffi/tests/c-tests.rs
+++ b/openpgp-ffi/tests/c-tests.rs
@@ -264,6 +264,9 @@ fn run(ldpath: &Path, exe: &Path) -> io::Result<()> {
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>");
+
let mut last_include = 0;
for (n, line) in test.iter().enumerate() {
if line.starts_with("#include") {