Skip to content

Commit 2904c80

Browse files
committed
syntax: add --lib to syntax tests
I couldn't figure how how to easily make doc tests run with 'no_std' enabled, which regex-syntax now does. The '?' in particular was tripping me up. We still get doctest coverage from the top-level 'cargo test'.
1 parent 9272fbb commit 2904c80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

regex-syntax/test

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ features=(
1919
)
2020
for f in "${features[@]}"; do
2121
echo "===== FEATURE: $f ==="
22-
cargo test --no-default-features --features "$f"
22+
# We only run library tests because I couldn't figure out how to easily
23+
# make doc tests run in 'no_std' mode. In particular, without the Error
24+
# trait, using '?' in doc tests seems tricky.
25+
cargo test --no-default-features --lib --features "$f"
2326
done

0 commit comments

Comments
 (0)