Skip to content

Commit 228e648

Browse files
committed
Use the default test flags in test-one.sh
1 parent a909b96 commit 228e648

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test-one.sh

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ TEST_BINDINGS_BINARY=$(mktemp -t bindings.XXXXXX)
2323

2424
FLAGS="$(grep "// bindgen-flags: " "$TEST" || echo)"
2525
FLAGS="${FLAGS/\/\/ bindgen\-flags:/}"
26+
# Prepend the default flags added in test.rs's `create_bindgen_builder`.
27+
FLAGS="--no-unstable-rust --with-derive-default --raw-line '' --raw-line '#![allow(non_snake_case)]' --raw-line '' $FLAGS"
28+
2629

2730
eval ./target/debug/bindgen \
2831
"\"$TEST\"" \
@@ -52,6 +55,7 @@ echo
5255

5356
EXPECTED=${TEST/headers/expectations\/tests}
5457
EXPECTED=${EXPECTED/.hpp/.rs}
58+
EXPECTED=${EXPECTED/.h/.rs}
5559

5660
# Don't exit early if there is a diff.
5761
diff -U8 "$EXPECTED" "$BINDINGS" || true

0 commit comments

Comments
 (0)