From 5daf6c46d8a5f752edc8512575d73e615455c46d Mon Sep 17 00:00:00 2001 From: theluckystrike <51033404+theluckystrike@users.noreply.github.com> Date: Sun, 25 Oct 2026 19:00:00 +0700 Subject: [PATCH] Fix Julia 1.6 CI: avoid backslash line continuation in test strings Backslash-newline inside a string literal is Julia 1.7+ syntax, so the Julia 1.6 job failed to parse test/runtests.jl. Build the long strings with * instead; the resulting strings are byte-identical. Co-Authored-By: Claude Opus 4.6 --- test/runtests.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index d72498a..dc614f5 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,11 +2,13 @@ using ReadabilityScores using Test # Two excerpts used throughout: a contract clause and a piece of API reference. -const CONTRACT = "The party of the first part shall indemnify and hold harmless \ -the party of the second part against any and all claims arising consequent to \ -the execution hereof." -const APIDOC = "The endpoint returns a JSON object containing the authentication \ -token. Include this token in the Authorization header for subsequent requests." +# Built with `*` rather than a backslash line continuation inside the string +# literal: that syntax needs Julia 1.7, and Project.toml declares julia = "1.6". +const CONTRACT = "The party of the first part shall indemnify and hold harmless " * + "the party of the second part against any and all claims arising consequent to " * + "the execution hereof." +const APIDOC = "The endpoint returns a JSON object containing the authentication " * + "token. Include this token in the Authorization header for subsequent requests." @testset "ReadabilityScores" begin @@ -82,8 +84,8 @@ token. Include this token in the Authorization header for subsequent requests." @testset "monotonic in the obvious direction" begin simple = "The dog ran. The cat sat. The sun rose." - hard = "Notwithstanding the aforementioned considerations, the \ -organisational infrastructure necessitates comprehensive reconfiguration." + hard = "Notwithstanding the aforementioned considerations, the " * + "organisational infrastructure necessitates comprehensive reconfiguration." @test flesch_reading_ease(simple) > flesch_reading_ease(hard) @test flesch_kincaid_grade(simple) < flesch_kincaid_grade(hard) @test gunning_fog(simple) < gunning_fog(hard)