Skip to content

Commit 4624990

Browse files
committed
Fix amplexe if KNITRO_jll is used
1 parent bc5c110 commit 4624990

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

src/KNITRO.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ end
3939
else
4040
import KNITRO_jll
4141
if KNITRO_jll.is_available()
42-
import KNITRO_jll: libknitro
42+
using KNITRO_jll: libknitro, knitroampl
43+
const amplexe = knitroampl
4344
else
4445
error(
4546
"Unsupported platform: Use a manual installation by setting " *

test/C_wrapper.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,3 +1001,10 @@ end
10011001
KN_free(model)
10021002
@test sprint(show, model) == "KNITRO Problem: NULL\n"
10031003
end
1004+
1005+
@testset "knitroampl" begin
1006+
@test occursin(
1007+
"AMPL/Knitro",
1008+
sprint(io -> run(pipeline(`$(KNITRO.amplexe()) -v`; stdout = io))),
1009+
)
1010+
end

0 commit comments

Comments
 (0)