Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate and resolve failing 1.11 tests #109

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: ['1.7', '1.8', '1.9', '1.10', '1.11']
julia-version: ['1.10', '1.11.0', '1.11.1', '1.11.2', '1.11.3']
julia-arch: [x64]
os: [ubuntu-latest, windows-latest, macOS-latest]

Expand Down
2 changes: 2 additions & 0 deletions src/buffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ VimMode(vm::VimMode) = vm
Defaults to normal mode.
"""
function testbuf(s::AbstractString)::VimBuffer
# issue with testbuf!
m = match(r"(.*?)\|(?:([ni])\|)?(.*)"s, s)
if m === nothing
throw(ArgumentError("could not construct VimBuffer with string \"$s\"\n Expecting a string with a pipe `|` indicating cursor position"))
Expand All @@ -37,6 +38,7 @@ function testbuf(s::AbstractString)::VimBuffer
buf = IOBuffer(; read=true, write=true, append=true)
cursor_index = write(buf, a)
after_cursor = write(buf, b)
@debug "creating testbuf" from=s start=a mode endd=b
# @debug "creating testbuf" cursor_index after_cursor

seek(buf, cursor_index)
Expand Down
4 changes: 2 additions & 2 deletions src/textutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ function at_junction_type(junc_type, juncs::Set)
# TODO nuke this whole thing
for junc in juncs
if junc isa junc_type
@debug "at_junction_type?" junc_type chars_by_cursor(buf) at_junction_type = true
# @debug "at_junction_type?" junc_type at_junction_type = true
return true
end
end
@debug "at_junction_type?" junc_type chars_by_cursor(buf) at_junction_type = false
# @debug "at_junction_type?" junc_type at_junction_type = false
return false
end
# Text helpers
Expand Down
2 changes: 2 additions & 0 deletions test/command.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ end

function run(test_string::String, command)::VimBuffer
buf = testbuf(test_string)
@debug "Running command against buffer" command buffer
return run(buf, command)
end

# https://github.com/caleb-allen/VimBindings.jl/issues?q=is%3Aissue+is%3Aopen+label%3Abug
@testset "bugs from github" begin
ENV["JULIA_DEBUG"] = "VimBindings"
# https://github.com/caleb-allen/VimBindings.jl/issues/48
@test run("b::|Float64", "ciw") == testbuf("b::|i|")

Expand Down
Loading