File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,15 @@ module FZN
13
13
include (" FlatZincOptimizer.jl" )
14
14
end
15
15
16
+ function run_chuffed (args)
17
+ io = IOBuffer ()
18
+ Chuffed_jll. fznchuffed () do exe
19
+ return run (pipeline (` $(exe) $(args) ` ; stdout = io))
20
+ end
21
+ seekstart (io)
22
+ return String (take! (io))
23
+ end
24
+
16
25
function Optimizer (; stdin :: IO = stdin , stdout :: IO = stdout )
17
26
return FZN. Optimizer (Chuffed_jll. run_chuffed; stdin = stdin , stdout = stdout )
18
27
end
Original file line number Diff line number Diff line change 1
1
@testset " Parsing FlatZinc output format" begin
2
-
2
+ @testset " puzzle.fzn" begin
3
+ in_file_name = @__DIR__ () * " /assets/puzzle.fzn"
4
+ out_string = Chuffed. run_chuffed (in_file_name)
5
+ @show out_string
6
+ @show Chuffed. FZN. _parse_to_fznresults (out_string)
7
+ end
3
8
end
You can’t perform that action at this time.
0 commit comments