Debian Codegraph @

debian/missing-sources/regex/test

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 set -e
4
5 # cd to the directory containing this crate's Cargo.toml so that we don't need
6 # to pass --manifest-path to every `cargo` command.
7 cd "$(dirnamescip-shell system . . dirname. "$0")"
8
9 # This is a convenience script for running a broad swath of tests across
10 # features. We don't test the complete space, since the complete space is quite
11 # large. Hopefully once we migrate the test suite to better infrastructure
12 # (like regex-automata), we'll be able to test more of the space.
13 echoscip-shell system . . echo. "===== DEFAULT FEATURES ====="
14 cargoscip-shell system . . cargo. test
15
16 # no-std mode is annoyingly difficult to test. Currently, the integration tests
17 # don't run. So for now, we just test that library tests run. (There aren't
18 # many because `regex` is just a wrapper crate.)
19 cargoscip-shell system . . cargo. test --no-default-features --lib
20
21 echoscip-shell system . . echo. "===== DOC TESTS ====="
22 cargoscip-shell system . . cargo. test --doc
23
24 features=(
25 "std"
26 "std unicode"
27 "std unicode-perl"
28 "std perf"
29 "std perf-cache"
30 "std perf-dfa"
31 "std perf-inline"
32 "std perf-literal"
33 "std perf-dfa-full"
34 "std perf-onepass"
35 "std perf-backtrack"
36 )
37 for f in "${features[@]}"; do
38 echoscip-shell system . . echo. "===== FEATURE: $f ====="
39 cargoscip-shell system . . cargo. test --test integration --no-default-features --features "$f"
40 done
41
42 # And test the probably-forever-nightly-only 'pattern' feature...
43 if rustcscip-shell system . . rustc. --version | grepscip-shell system . . grep. -q nightly; then
44 echoscip-shell system . . echo. "===== FEATURE: std,pattern,unicode-perl ====="
45 cargoscip-shell system . . cargo. test --test integration --no-default-features --features std,pattern,unicode-perl
46 fi