-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.jq
More file actions
executable file
·33 lines (29 loc) · 921 Bytes
/
test.jq
File metadata and controls
executable file
·33 lines (29 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env -S name=dummy jq --run-tests
# Run in the same directory as "ubermakefile.jq".
# Each test is composed of 3+ contiguous lines.
# Comments and empty lines are ignored.
# 1) test program
# 2) input data
# 3) expected output (more lines if the output has multiple results)
import "ubermakefile" as u; u::depbuild_commands
{"dependencies":{"dummy":{"build":["hello","world"]}}}
"'hello' 'world'"
import "ubermakefile" as u; u::build_flags(.flags.common; "dummy:")
{"flags":{"common":{"CXXFLAGS":"-std=c++20","CPPFLAGS":"-Iinc"}}}
"$(eval dummy: CXXFLAGS+=-std=c++20)"
"$(eval dummy: CPPFLAGS+=-Iinc)"
import "ubermakefile" as u; u::build_pkgconfig("--libs")
{"dependencies":{"aa":{"static":false},"bb":{"static":true}}}
"pkg-config"
"--libs"
"aa"
";"
"pkg-config"
"--libs"
"--static"
"bb"
";"
import "ubermakefile" as u; u::build_targets
{"targets":{"bar":null,"libfoo.so":null}}
"bin/bar"
"bin/libfoo.so"