1- use std:: process:: Command ;
21use assert_cmd:: prelude:: * ;
2+ use std:: process:: Command ;
33
44#[ test]
55fn runs_without_arguments ( ) {
@@ -9,15 +9,17 @@ fn runs_without_arguments() {
99
1010#[ test]
1111fn fails_when_in_wrong_dir ( ) {
12- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
12+ Command :: cargo_bin ( "rustlings" )
13+ . unwrap ( )
1314 . current_dir ( "tests/" )
1415 . assert ( )
1516 . failure ( ) ;
1617}
1718
1819#[ test]
1920fn verify_all_success ( ) {
20- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
21+ Command :: cargo_bin ( "rustlings" )
22+ . unwrap ( )
2123 . arg ( "v" )
2224 . current_dir ( "tests/fixture/" )
2325 . assert ( )
@@ -26,7 +28,8 @@ fn verify_all_success() {
2628
2729#[ test]
2830fn run_single_compile_success ( ) {
29- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
31+ Command :: cargo_bin ( "rustlings" )
32+ . unwrap ( )
3033 . args ( & [ "r" , "compSuccess.rs" ] )
3134 . current_dir ( "tests/fixture/" )
3235 . assert ( )
@@ -35,7 +38,8 @@ fn run_single_compile_success() {
3538
3639#[ test]
3740fn run_single_test_success ( ) {
38- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
41+ Command :: cargo_bin ( "rustlings" )
42+ . unwrap ( )
3943 . args ( & [ "r" , "testSuccess.rs" ] )
4044 . current_dir ( "tests/fixture/" )
4145 . assert ( )
@@ -44,7 +48,8 @@ fn run_single_test_success() {
4448
4549#[ test]
4650fn run_single_test_no_filename ( ) {
47- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
51+ Command :: cargo_bin ( "rustlings" )
52+ . unwrap ( )
4853 . arg ( "r" )
4954 . current_dir ( "tests/fixture/" )
5055 . assert ( )
@@ -53,7 +58,8 @@ fn run_single_test_no_filename() {
5358
5459#[ test]
5560fn run_single_test_no_exercise ( ) {
56- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
61+ Command :: cargo_bin ( "rustlings" )
62+ . unwrap ( )
5763 . args ( & [ "r" , "compNoExercise.rs" ] )
5864 . current_dir ( "tests/fixture/" )
5965 . assert ( )
0 commit comments