@@ -16,6 +16,9 @@ fn modify_script_no_shebang_default_options() {
1616
1717 let cwd = current_dir ( ) . unwrap ( ) ;
1818 let mut expected_script = "" . to_string ( ) ;
19+ if cfg ! ( windows) {
20+ expected_script. push_str ( "@echo off\n " ) ;
21+ }
1922 expected_script. push_str ( "cd \" " ) ;
2023 expected_script. push_str ( cwd. to_str ( ) . unwrap ( ) ) ;
2124 expected_script. push_str ( "\" \n echo test\n \n " ) ;
@@ -25,6 +28,7 @@ fn modify_script_no_shebang_default_options() {
2528 assert_eq ! ( script, expected_script) ;
2629}
2730
31+ #[ cfg( not( windows) ) ]
2832#[ test]
2933fn modify_script_with_shebang_default_options ( ) {
3034 let options = ScriptOptions :: new ( ) ;
@@ -49,6 +53,8 @@ fn modify_script_exit_on_error() {
4953 let mut expected_script = "" . to_string ( ) ;
5054 if !cfg ! ( windows) {
5155 expected_script. push_str ( "set -e\n " ) ;
56+ } else {
57+ expected_script. push_str ( "@echo off\n " ) ;
5258 }
5359 expected_script. push_str ( "cd \" " ) ;
5460 expected_script. push_str ( cwd. to_str ( ) . unwrap ( ) ) ;
@@ -66,6 +72,9 @@ fn modify_script_working_directory() {
6672
6773 let cwd = current_dir ( ) . unwrap ( ) ;
6874 let mut expected_script = "" . to_string ( ) ;
75+ if cfg ! ( windows) {
76+ expected_script. push_str ( "@echo off\n " ) ;
77+ }
6978 expected_script. push_str ( "cd \" " ) ;
7079 expected_script. push_str ( cwd. to_str ( ) . unwrap ( ) ) ;
7180 expected_script. push_str ( "\" && cd \" /usr/me/home\" \n echo test\n \n " ) ;
0 commit comments