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

Quotes test is failing locally and ignored on CI #434

Open
gdalle opened this issue Oct 12, 2023 · 0 comments
Open

Quotes test is failing locally and ignored on CI #434

gdalle opened this issue Oct 12, 2023 · 0 comments
Labels

Comments

@gdalle
Copy link
Collaborator

gdalle commented Oct 12, 2023

In the interactive test suite, one test always fails in Simulated inputs / Quotes.
The user and dir keyword arguments to Template are given with escaped quotes:

@testset "Quotes" begin
    print(
        stdin.buffer,
        CR, DOWN^2, CR, DONE,  # Customize user and dir
        "\"me\"", LF,          # Enter user with quotes
        "\"~\"", LF,           # Enter home dir with quotes
    )
    t1 = Template(; interactive=true)  # debug addition
    t2 = Template(; user="me", dir="~")  # debug addition
    @warn "Quotes" t1.user t1.dir t2.user t2.dir  # debug addition
    result = Template(; interactive=true) == Template(; user="me", dir="~")
    if get(ENV, "CI", "false") == "true"
        @test_broken result
    else
        @test result
    end
    [...]
end

While it works for dir (quotes are removed), it fails for user:

Enter value for 'user' (required): Enter value for 'dir' (default: /tmp/jl_lgEt7r/dev): ┌ Warning: Quotes
│   t1.user = "\"me\""
│   t1.dir = "/home/gdalle"
│   t2.user = "me"
│   t2.dir = "/home/gdalle"
└ @ Main ~/Work/GitHub/Julia/PkgTemplates.jl/test/interactive.jl:200

Any idea why this happens?

@gdalle gdalle changed the title Quote test is failing locally and ignored on CI Quotes test is failing locally and ignored on CI Oct 12, 2023
@gdalle gdalle added the bug label Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant