From bced6affe67092c2d12737d03aa51fcd041f2d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Drvo=C5=A1t=C4=9Bp?= Date: Fri, 10 Nov 2023 12:10:18 +0100 Subject: [PATCH] Fix flakey test --- test/runtests.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index dd743c2..b108b38 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -459,6 +459,7 @@ end @testset "initial_lex!" begin lexer = NewlineLexers.Lexer(IOBuffer("1"), nothing, UInt8('\n')) ctx = ChunkingContext(4, 1, 0, nothing) + ctx.bytes .= false @assert lexer.done == false @assert ctx.newline_positions == [0] ChunkedBase.initial_lex!(lexer, ctx, 0) @@ -466,6 +467,7 @@ end lexer = NewlineLexers.Lexer(IOBuffer("1"), nothing, UInt8('\n')) ctx = ChunkingContext(4, 1, 0, nothing) + ctx.bytes .= false @assert lexer.done == false @assert ctx.newline_positions == [0] seekend(lexer.io) @@ -489,6 +491,7 @@ end lexer = NewlineLexers.Lexer(IOBuffer("1"), nothing, UInt8('\n')) ctx = ChunkingContext(4, 1, 0, nothing) + ctx.bytes .= false ctx.newline_positions.elements[1] = 1 @test_throws AssertionError ChunkedBase.initial_lex!(lexer, ctx, 0) @test_throws AssertionError ChunkedBase.initial_lex!(lexer, ctx, 5) @@ -496,6 +499,7 @@ end lexer = NewlineLexers.Lexer(IOBuffer("1"), nothing, UInt8('\n')) lexer.done = true ctx = ChunkingContext(4, 1, 0, nothing) + ctx.bytes .= false @test_throws AssertionError ChunkedBase.initial_lex!(lexer, ctx, 0) @test_throws AssertionError ChunkedBase.initial_lex!(lexer, ctx, 5)