aboutsummaryrefslogtreecommitdiff
path: root/tests/api/testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-12-13 00:56:44 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-12-13 02:27:49 +0300
commit00824fd4db22e931193a0c86e38b22025b79306f (patch)
tree7cc463c181919368edb7581d87a92f37e85704dc /tests/api/testscript
parent429162ba11e58758e5e4ac4f03239891fc3e189c (diff)
Add libpkgconf API basic test
Diffstat (limited to 'tests/api/testscript')
-rw-r--r--tests/api/testscript110
1 files changed, 110 insertions, 0 deletions
diff --git a/tests/api/testscript b/tests/api/testscript
new file mode 100644
index 0000000..01f883b
--- /dev/null
+++ b/tests/api/testscript
@@ -0,0 +1,110 @@
+# file : tests/api/testscript
+# copyright : Copyright (c) 2016-2017 Code Synthesis Ltd
+# license : ISC; see accompanying COPYING file
+
+: double-quoted
+:
+{
+ +cat <<EOI >=libfoo.pc
+ prefix="C:\\Program Files\\Foo"
+ exec_prefix=${prefix}
+ Name: libfoo
+ Description: Foo library
+ Version: 1.0
+ Libs: "-LC:\\Program Files\\Foo" "-lC:\\Program Files\\Foo\\foo"
+ Cflags: "-IC:\\Program Files\\Foo"
+ EOI
+
+ f = $~/libfoo.pc
+
+ : cflags
+ :
+ $* --cflags $f >>EOO
+ I C:\Program Files\Foo
+ EOO
+
+ : libs
+ :
+ $* --libs $f >>EOO
+ L C:\Program Files\Foo
+ l C:\Program Files\Foo\foo
+ EOO
+
+ : vars
+ :
+ $* --vars $f >>EOO
+ exec_prefix "C:\\Program Files\\Foo"
+ prefix "C:\\Program Files\\Foo"
+ EOO
+}
+
+: single-quoted
+{
+ +cat <<EOI >=libfoo.pc
+ prefix='C:\Program Files\Foo'
+ exec_prefix=${prefix}
+ Name: libfoo
+ Description: Foo library
+ Version: 1.0
+ Libs: '-LC:\Program Files\Foo' '-lC:\Program Files\Foo\foo'
+ Cflags: '-IC:\Program Files\Foo'
+ EOI
+
+ f = $~/libfoo.pc
+
+ : cflags
+ :
+ $* --cflags $f >>EOO
+ I C:Program FilesFoo
+ EOO
+
+ : libs
+ :
+ $* --libs $f >>EOO
+ L C:Program FilesFoo
+ l C:Program FilesFoofoo
+ EOO
+
+ : vars
+ :
+ $* --vars $f >>EOO
+ exec_prefix 'C:\Program Files\Foo'
+ prefix 'C:\Program Files\Foo'
+ EOO
+}
+
+: unquoted
+:
+{
+ +cat <<EOI >=libfoo.pc
+ prefix=C:\\Program\ \ \ Files\\Foo
+ exec_prefix=${prefix}
+ Name: libfoo
+ Description: Foo library
+ Version: 1.0
+ Libs: -LC:\\Program\ \ \ Files\\Foo -lC:\\Program\ \ \ Files\\Foo\\foo
+ Cflags: -IC:\\Program\ \ \ Files\\Foo
+ EOI
+
+ f = $~/libfoo.pc
+
+ : cflags
+ :
+ $* --cflags $f >>EOO
+ I C:\\Program Files\\Foo
+ EOO
+
+ : libs
+ :
+ $* --libs $f >>EOO
+ L C:\\Program Files\\Foo
+ l C:\\Program Files\\Foo\\foo
+ EOO
+
+ : vars
+ :
+ $* --vars $f >>EOO
+ exec_prefix C:\\Program\ \ \ Files\\Foo
+ prefix C:\\Program\ \ \ Files\\Foo
+ EOO
+}