aboutsummaryrefslogtreecommitdiff
path: root/tests/api/testscript
diff options
context:
space:
mode:
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
+}