Skip to content

Commit

Permalink
Made a mistake in parsing the .proj file.
Browse files Browse the repository at this point in the history
  • Loading branch information
CuppoJava committed Nov 28, 2022
1 parent 1b55fe5 commit 24d25e2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/proj-variable-substitution.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -244,4 +244,5 @@ defn check-valid-substitution (v:ProjValue) -> String|False :
(v:ProjValues) : find-by<String>(seq(check-valid-substitution, values(v)))
(v:ProjTuple) : check-valid-substitution(value(v))
(v:ProjTableS0) : "table"
(v:CondPlatform) : find-by<String>(seq(check-valid-substitution{value(_)}, values(v)))

16 changes: 16 additions & 0 deletions tests/data/ex2.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
;Example proj file

var myvar =
on-platform :
os-x:
A
B
C
else :
D
E
F

package myprogram requires :
ccflags: "{myvar}"

4 changes: 4 additions & 0 deletions tests/test-proj.stanza
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ deftest build-dev-proj :

deftest read-proj-ex :
val output = call-dev-tool $ ["dev-proj" data-file("ex1.proj")]
println(output)

deftest read-proj-ex :
val output = call-dev-tool $ ["dev-proj" data-file("ex2.proj")]
println(output)

0 comments on commit 24d25e2

Please sign in to comment.