1
- use std:: process:: Command ;
2
1
use assert_cmd:: prelude:: * ;
2
+ use std:: process:: Command ;
3
3
4
4
#[ test]
5
5
fn runs_without_arguments ( ) {
@@ -9,15 +9,17 @@ fn runs_without_arguments() {
9
9
10
10
#[ test]
11
11
fn fails_when_in_wrong_dir ( ) {
12
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
12
+ Command :: cargo_bin ( "rustlings" )
13
+ . unwrap ( )
13
14
. current_dir ( "tests/" )
14
15
. assert ( )
15
16
. failure ( ) ;
16
17
}
17
18
18
19
#[ test]
19
20
fn verify_all_success ( ) {
20
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
21
+ Command :: cargo_bin ( "rustlings" )
22
+ . unwrap ( )
21
23
. arg ( "v" )
22
24
. current_dir ( "tests/fixture/" )
23
25
. assert ( )
@@ -26,7 +28,8 @@ fn verify_all_success() {
26
28
27
29
#[ test]
28
30
fn run_single_compile_success ( ) {
29
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
31
+ Command :: cargo_bin ( "rustlings" )
32
+ . unwrap ( )
30
33
. args ( & [ "r" , "compSuccess.rs" ] )
31
34
. current_dir ( "tests/fixture/" )
32
35
. assert ( )
@@ -35,7 +38,8 @@ fn run_single_compile_success() {
35
38
36
39
#[ test]
37
40
fn run_single_test_success ( ) {
38
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
41
+ Command :: cargo_bin ( "rustlings" )
42
+ . unwrap ( )
39
43
. args ( & [ "r" , "testSuccess.rs" ] )
40
44
. current_dir ( "tests/fixture/" )
41
45
. assert ( )
@@ -44,7 +48,8 @@ fn run_single_test_success() {
44
48
45
49
#[ test]
46
50
fn run_single_test_no_filename ( ) {
47
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
51
+ Command :: cargo_bin ( "rustlings" )
52
+ . unwrap ( )
48
53
. arg ( "r" )
49
54
. current_dir ( "tests/fixture/" )
50
55
. assert ( )
@@ -53,7 +58,8 @@ fn run_single_test_no_filename() {
53
58
54
59
#[ test]
55
60
fn run_single_test_no_exercise ( ) {
56
- Command :: cargo_bin ( "rustlings" ) . unwrap ( )
61
+ Command :: cargo_bin ( "rustlings" )
62
+ . unwrap ( )
57
63
. args ( & [ "r" , "compNoExercise.rs" ] )
58
64
. current_dir ( "tests/fixture/" )
59
65
. assert ( )
0 commit comments