File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,27 @@ fn run_single_test_no_exercise() {
110
110
. code ( 1 ) ;
111
111
}
112
112
113
+ #[ test]
114
+ fn reset_single_exercise ( ) {
115
+ Command :: cargo_bin ( "rustlings" )
116
+ . unwrap ( )
117
+ . args ( & [ "reset" , "intro1" ] )
118
+ . assert ( )
119
+ . code ( 0 ) ;
120
+ }
121
+
122
+ #[ test]
123
+ fn reset_no_exercise ( ) {
124
+ Command :: cargo_bin ( "rustlings" )
125
+ . unwrap ( )
126
+ . arg ( "reset" )
127
+ . assert ( )
128
+ . code ( 1 )
129
+ . stderr ( predicates:: str:: contains (
130
+ "positional arguments not provided" ,
131
+ ) ) ;
132
+ }
133
+
113
134
#[ test]
114
135
fn get_hint_for_single_test ( ) {
115
136
Command :: cargo_bin ( "rustlings" )
@@ -126,7 +147,7 @@ fn all_exercises_require_confirmation() {
126
147
for exercise in glob ( "exercises/**/*.rs" ) . unwrap ( ) {
127
148
let path = exercise. unwrap ( ) ;
128
149
if path. file_name ( ) . unwrap ( ) == "mod.rs" {
129
- continue
150
+ continue ;
130
151
}
131
152
let source = {
132
153
let mut file = File :: open ( & path) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments