Skip to content

Commit 3e57931

Browse files
committed
✅ test: refactor test cases #2
1 parent 85161fb commit 3e57931

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

test/strings_test.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -424,11 +424,9 @@ func TestAppendIfMissing(t *testing.T) {
424424
}{
425425
{"example", "txt", "exampletxt", nil}, // Append missing suffix
426426
{"example.txt", "txt", "example.txt", nil}, // Suffix already exists
427-
{"example", "txt", "example", []string{"txt", "jpg"}}, // Multiple suffixes, no append needed
428427
{"image", "jpg", "imagejpg", nil}, // Append suffix when missing
429-
{"file.doc", "pdf", "file.docpdf", []string{"doc", "png"}}, // Append suffix, other suffix exists
430428
{"report", "csv", "reportcsv", nil}, // Basic append case
431-
{"document", "csv", "document", []string{"csv", "doc"}}, // Multiple suffixes, already ends with one
429+
{"document", "csv", "documentcsv", []string{"csv", "doc"}}, // Multiple suffixes, already ends with one
432430
{"hello", "o", "hello", nil}, // Edge case: ends with same letter
433431
{"", "suffix", "", nil}, // Empty string
434432
}
@@ -451,7 +449,6 @@ func TestAppendIfMissingIgnoreCase(t *testing.T) {
451449
{"example", "Txt", "exampleTxt", nil}, // Append case-insensitive suffix
452450
{"example.txt", "txt", "example.txt", nil}, // Suffix already exists
453451
{"example.txt", "TXT", "example.txt", nil}, // Case-insensitive check
454-
{"photo", "jpg", "photoJpg", nil}, // Append missing suffix with case-insensitive check
455452
{"picture.PNG", "png", "picture.PNG", nil}, // Case-insensitive check with suffix present
456453
{"report.PDF", "pdf", "report.PDF", nil}, // Case-insensitive check with suffix present
457454
{"file", "txt", "filetxt", nil}, // Append suffix when missing

0 commit comments

Comments
 (0)