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() {
110110 . code ( 1 ) ;
111111}
112112
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+
113134#[ test]
114135fn get_hint_for_single_test ( ) {
115136 Command :: cargo_bin ( "rustlings" )
@@ -126,7 +147,7 @@ fn all_exercises_require_confirmation() {
126147 for exercise in glob ( "exercises/**/*.rs" ) . unwrap ( ) {
127148 let path = exercise. unwrap ( ) ;
128149 if path. file_name ( ) . unwrap ( ) == "mod.rs" {
129- continue
150+ continue ;
130151 }
131152 let source = {
132153 let mut file = File :: open ( & path) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments