From 41cc4d2f299a07b1593b7e0ab5e44be049d3a12a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Legat?= Date: Fri, 6 Nov 2026 16:44:42 +0100 Subject: [PATCH] Fix NL reader display assertion on Julia nightly Build the unary-plus expectation from an Expr so the test follows Julia's display syntax across versions. Validation: repository-wide JuliaFormatter 2.14.7. Tests intentionally deferred to CI. --- test/FileFormats/NL/test_read.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/FileFormats/NL/test_read.jl b/test/FileFormats/NL/test_read.jl index 6e8a456e4e..e9f7e0c747 100644 --- a/test/FileFormats/NL/test_read.jl +++ b/test/FileFormats/NL/test_read.jl @@ -648,8 +648,10 @@ function test_hs071() end model_print = sprint(print, model) _in_ = @static Sys.iswindows() ? "in" : "∈" + # Julia versions differ in how they print unary operators. + unary_plus = Expr(:call, :+, 2.0) for line in [ - "(1.1 * v[1] + 1.4 * v[2] + 1.2 * v[3] + 1.3 * v[4]) + +2.0", + "(1.1 * v[1] + 1.4 * v[2] + 1.2 * v[3] + 1.3 * v[4]) + $unary_plus", "v[1] >= 1.1", "v[2] >= 1.4", "v[3] >= 1.2",