Skip to content

Commit e58080f

Browse files
committed
test: Loop if content length is zero for Windows (#1151)
On Windows it seems the file can be created before the content has been written, which results in comparing an empty string.
1 parent 8da37f2 commit e58080f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

agent/agent_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ func TestAgent(t *testing.T) {
175175
if err != nil {
176176
return false
177177
}
178+
if len(content) == 0 {
179+
return false
180+
}
178181
if runtime.GOOS == "windows" {
179182
// Windows uses UTF16! 🪟🪟🪟
180183
content, _, err = transform.Bytes(unicode.UTF16(unicode.LittleEndian, unicode.UseBOM).NewDecoder(), content)

0 commit comments

Comments
 (0)