File tree Expand file tree Collapse file tree 3 files changed +289
-289
lines changed Expand file tree Collapse file tree 3 files changed +289
-289
lines changed Original file line number Diff line number Diff line change 11use assert_cmd:: Command ;
22use expect_test:: expect_file;
33
4- fn cmd ( ) -> Command {
5- Command :: cargo_bin ( env ! ( "CARGO_PKG_NAME" ) ) . unwrap ( )
6- }
7-
8- #[ test]
9- fn standard_proof ( ) {
10- let output = cmd ( ) . args ( [ "tests/standard_proof.rs" ] ) . output ( ) . unwrap ( ) ;
4+ fn cmd ( args : & [ & str ] ) -> String {
5+ let output = Command :: cargo_bin ( env ! ( "CARGO_PKG_NAME" ) ) . unwrap ( ) . args ( args) . output ( ) . unwrap ( ) ;
116 assert ! (
127 output. status. success( ) ,
138 "Failed to test standard_proof.rs:\n {}" ,
149 std:: str :: from_utf8( & output. stderr) . unwrap( )
1510 ) ;
1611
17- let stdout = String :: from_utf8_lossy ( & output. stdout ) ;
18- expect_file ! [ "./snapshots/standard_proof.json" ] . assert_eq ( & stdout) ;
12+ String :: from_utf8 ( output. stdout ) . unwrap ( )
13+ }
14+
15+ #[ test]
16+ fn standard_proofs ( ) {
17+ let json = cmd ( & [ "tests/standard_proofs.rs" ] ) ;
18+ expect_file ! [ "./snapshots/standard_proofs.json" ] . assert_eq ( & json) ;
1919}
You can’t perform that action at this time.
0 commit comments