File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -160,13 +160,13 @@ func TestProcess_Success(t *testing.T) {
160160 // Create two temporary files with known content.
161161 file1Path := tempDir + "/file1.txt"
162162 content1 := []byte ("hello world" )
163- if err := os .WriteFile (file1Path , content1 , 0644 ); err != nil {
163+ if err := os .WriteFile (file1Path , content1 , 0o644 ); err != nil {
164164 t .Fatalf ("WriteFile error for file1: %v" , err )
165165 }
166166
167167 file2Path := tempDir + "/file2.txt"
168168 content2 := []byte ("Go testing!" )
169- if err := os .WriteFile (file2Path , content2 , 0644 ); err != nil {
169+ if err := os .WriteFile (file2Path , content2 , 0o644 ); err != nil {
170170 t .Fatalf ("WriteFile error for file2: %v" , err )
171171 }
172172
@@ -245,7 +245,7 @@ func TestProcess_Error(t *testing.T) {
245245}
246246
247247func contains (s , substr string ) bool {
248- return len (s ) >= len (substr ) && (s == substr || (len ( s ) > 0 && indexOf (s , substr ) >= 0 ))
248+ return len (s ) >= len (substr ) && (s == substr || (s != "" && indexOf (s , substr ) >= 0 ))
249249}
250250
251251func indexOf (s , substr string ) int {
You can’t perform that action at this time.
0 commit comments