File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,20 @@ func TestExtendedData_Run_Success(t *testing.T) {
2626 if err != nil {
2727 t .Fatalf ("Failed to create temp dir: %v" , err )
2828 }
29- defer os .RemoveAll (testDir )
29+ defer os .RemoveAll (scriptDir )
3030
3131 // Step 2: Define paths
3232 outputFile := filepath .Join (testDir , "output.log" )
33- scriptFile := filepath . Join ( scriptDir , "test-script.bat" )
33+ scriptFile := ""
3434
3535 // Step 3: Create a simple .bat script
3636 var scriptContent = ""
3737 if runtime .GOOS == "windows" {
3838 scriptContent = "@echo off\r \n echo test-data > \" " + outputFile + "\" \r \n "
39+ scriptFile = filepath .Join (scriptDir , "test-script.bat" )
3940 } else {
40- scriptContent = "#!/bin/sh \r \n echo test-data > \" " + outputFile + "\" \r \n "
41+ scriptContent = "#!/bin/sh\n echo test-data > " + outputFile + "\n "
42+ scriptFile = filepath .Join (scriptDir , "test-script.sh" )
4143 }
4244
4345 err = os .WriteFile (scriptFile , []byte (scriptContent ), 0777 )
You can’t perform that action at this time.
0 commit comments