File tree Expand file tree Collapse file tree 3 files changed +23
-1
lines changed
Expand file tree Collapse file tree 3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 5757 run : cargo test -p rustc_codegen_spirv --release --no-default-features --features "use-installed-tools"
5858
5959 - name : workspace test (excluding examples & difftest)
60- run : cargo test --release --workspace --exclude "example-runner-*" --exclude "difftest*" --no-default-features --features "use-installed-tools"
60+ run : cargo test --release --workspace --exclude "example-runner-*" --exclude "difftest*" --no-default-features --features "use-installed-tools,clap "
6161
6262 # Examples
6363 - name : cargo check examples
Original file line number Diff line number Diff line change 7373
7474pub mod cargo_cmd;
7575mod depfile;
76+ #[ cfg( test) ]
77+ mod tests;
7678#[ cfg( feature = "watch" ) ]
7779mod watch;
7880
Original file line number Diff line number Diff line change 1+ #[ cfg( feature = "clap" ) ]
2+ mod clap {
3+ pub use crate :: * ;
4+ use clap:: Parser ;
5+
6+ /// look at the output of this test to see what `--help` prints
7+ #[ test]
8+ fn test_clap_help ( ) {
9+ // any malformed clap declarations should panic within clap's parse
10+ match SpirvBuilder :: try_parse_from ( [ "" , "--help" ] ) {
11+ Ok ( _) => panic ! ( "`--help` should make clap return an error" ) ,
12+ Err ( e) => {
13+ let e = e. to_string ( ) ;
14+ println ! ( "{}" , e) ;
15+ // sanity check help
16+ assert ! ( e. contains( "--target" ) ) ;
17+ }
18+ } ;
19+ }
20+ }
You can’t perform that action at this time.
0 commit comments