diff options
Diffstat (limited to 'tests/auto/pkgconfig/testdata')
18 files changed, 255 insertions, 0 deletions
diff --git a/tests/auto/pkgconfig/testdata/non-l-required.json b/tests/auto/pkgconfig/testdata/non-l-required.json new file mode 100644 index 000000000..d2dd90f06 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/non-l-required.json @@ -0,0 +1,12 @@ +{ + "Name": "Non-l flags required test package", + "Description": "Test package for checking order of non-L Libs & Cflags", + "Version": "1.0.0", + "Libs": [ + {"Type": "StaticLibraryName", "Value": "/non-l-required.a"}, + {"Type": "LinkerFlag", "Value": "-pthread"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/non-l-required/include"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/non-l-required.pc b/tests/auto/pkgconfig/testdata/non-l-required.pc new file mode 100644 index 000000000..7e398e2e1 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/non-l-required.pc @@ -0,0 +1,5 @@ +Name: Non-l flags required test package +Description: Test package for checking order of non-L Libs & Cflags +Version: 1.0.0 +Libs: /non-l-required.a -pthread +Cflags: -I/non-l-required/include diff --git a/tests/auto/pkgconfig/testdata/requires-test.json b/tests/auto/pkgconfig/testdata/requires-test.json new file mode 100644 index 000000000..32acf4b91 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/requires-test.json @@ -0,0 +1,18 @@ +{ + "Name": "Requires test package", + "Description": "Dummy pkgconfig test package for testing Requires/Requires.private", + "Version": "1.0.0", + "Libs": [ + {"Type": "LibraryPath", "Value": "/requires-test/lib"}, + {"Type": "LibraryName", "Value": "requires-test"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/requires-test/include"} + ], + "Requires": [ + {"Comparison": "GreaterThanEqual", "Name": "public-dep", "Version": "1"} + ], + "RequiresPrivate": [ + {"Comparison": "GreaterThanEqual", "Name": "private-dep", "Version": "1"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/requires-test.pc b/tests/auto/pkgconfig/testdata/requires-test.pc new file mode 100644 index 000000000..e483db2db --- /dev/null +++ b/tests/auto/pkgconfig/testdata/requires-test.pc @@ -0,0 +1,8 @@ +Name: Requires test package +Description: Dummy pkgconfig test package for testing Requires/Requires.private +Version: 1.0.0 +Requires: public-dep >= 1 +Requires.private: private-dep >= 1 +Libs: -L/requires-test/lib -lrequires-test +Cflags: -I/requires-test/include + diff --git a/tests/auto/pkgconfig/testdata/simple.json b/tests/auto/pkgconfig/testdata/simple.json new file mode 100644 index 000000000..d58556e74 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/simple.json @@ -0,0 +1,20 @@ +{ + "Name": "Simple test", + "Description": "Dummy pkgconfig test package for testing pkgconfig", + "Version": "1.0.0", + "Vars": { + "prefix": "/usr", + "exec_prefix": "/usr", + "libdir": "/usr/lib", + "includedir": "/usr/include" + }, + "Libs": [ + {"Type": "LibraryName", "Value": "simple"} + ], + "LibsPrivate": [ + {"Type": "LibraryName", "Value": "m"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/usr/include"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/simple.pc b/tests/auto/pkgconfig/testdata/simple.pc new file mode 100644 index 000000000..2daa0350f --- /dev/null +++ b/tests/auto/pkgconfig/testdata/simple.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Simple test +Description: Dummy pkgconfig test package for testing pkgconfig +Version: 1.0.0 +Requires: +Libs: -lsimple +Libs.private: -lm +Cflags: -I${includedir} diff --git a/tests/auto/pkgconfig/testdata/special-flags.json b/tests/auto/pkgconfig/testdata/special-flags.json new file mode 100644 index 000000000..1949820a6 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/special-flags.json @@ -0,0 +1,30 @@ +{ + "Name": "Special flags test", + "Description": "Dummy pkgconfig test package for testing pkgconfig", + "Version": "1.0.0", + "Vars": { + "prefix": "/usr", + "exec_prefix": "/usr", + "libdir": "/usr/lib", + "includedir": "/usr/include" + }, + "Libs": [ + {"Type": "LibraryPath", "Value": "/foo"}, + {"Type": "Framework", "Value": "Foo"}, + {"Type": "LibraryName", "Value": "simple"}, + {"Type": "LibraryPath", "Value": "/bar"}, + {"Type": "Framework", "Value": "Bar"}, + {"Type": "LinkerFlag", "Value": "-Wl,-framework"}, + {"Type": "LinkerFlag", "Value": "-Wl,Baz"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/foo"}, + {"Type": "CompilerFlag", "Value": "-g"}, + {"Type": "SystemIncludePath", "Value": "/system1"}, + {"Type": "DirAfterIncludePath", "Value": "/after1"}, + {"Type": "CompilerFlag", "Value": "-ffoo"}, + {"Type": "IncludePath", "Value": "/bar"}, + {"Type": "DirAfterIncludePath", "Value": "/after2"}, + {"Type": "SystemIncludePath", "Value": "/system2"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/special-flags.pc b/tests/auto/pkgconfig/testdata/special-flags.pc new file mode 100644 index 000000000..0bdaeb1b0 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/special-flags.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: Special flags test +Description: Dummy pkgconfig test package for testing pkgconfig +Version: 1.0.0 +Requires: +Libs: -L/foo -framework Foo -lsimple -L/bar -framework Bar -Wl,-framework -Wl,Baz +Cflags: -I/foo -g -isystem /system1 -idirafter /after1 -ffoo -I/bar -idirafter /after2 -isystem /system2 diff --git a/tests/auto/pkgconfig/testdata/sysroot.json b/tests/auto/pkgconfig/testdata/sysroot.json new file mode 100644 index 000000000..7e8b3f6bb --- /dev/null +++ b/tests/auto/pkgconfig/testdata/sysroot.json @@ -0,0 +1,21 @@ +{ + "Name": "Test for sysroot", + "Description": "Test package for testing sysroot", + "Version": "1.0.0", + "Vars": { + "prefix": "/opt", + "exec_prefix": "/opt", + "libdir": "/opt/lib", + "includedir": "/opt/include", + "sysroot": "/newroot" + }, + "Libs": [ + {"Type": "LibraryPath", "Value": "/newroot/opt/lib"}, + {"Type": "LibraryName", "Value": "system"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/newroot/opt/include"}, + {"Type": "DirAfterIncludePath", "Value": "/newroot/opt/include/after"}, + {"Type": "SystemIncludePath", "Value": "/newroot/opt/include/system"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/sysroot.pc b/tests/auto/pkgconfig/testdata/sysroot.pc new file mode 100644 index 000000000..d2f78987f --- /dev/null +++ b/tests/auto/pkgconfig/testdata/sysroot.pc @@ -0,0 +1,12 @@ +prefix=/opt +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +sysroot=${pc_sysrootdir} + +Name: Test for sysroot +Description: Test package for testing sysroot +Version: 1.0.0 +Requires: +Libs: -L${libdir} -lsystem +Cflags: -I${includedir} -idirafter ${includedir}/after -isystem ${includedir}/system diff --git a/tests/auto/pkgconfig/testdata/system.json b/tests/auto/pkgconfig/testdata/system.json new file mode 100644 index 000000000..89007e7ec --- /dev/null +++ b/tests/auto/pkgconfig/testdata/system.json @@ -0,0 +1,17 @@ +{ + "Name": "System library", + "Description": "Test package", + "Version": "1.0.0", + "Vars": { + "prefix": "/usr", + "exec_prefix": "/usr", + "libdir": "/usr/lib", + "includedir": "/usr/include" + }, + "Libs": [ + {"Type": "LibraryName", "Value": "system"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/usr/include"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/system.pc b/tests/auto/pkgconfig/testdata/system.pc new file mode 100644 index 000000000..2cef2ed9b --- /dev/null +++ b/tests/auto/pkgconfig/testdata/system.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: System library +Description: Test package +Version: 1.0.0 +Libs: -L${libdir} -lsystem +Cflags: -I${includedir} diff --git a/tests/auto/pkgconfig/testdata/tilde.json b/tests/auto/pkgconfig/testdata/tilde.json new file mode 100644 index 000000000..01ea5d050 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/tilde.json @@ -0,0 +1,11 @@ +{ + "Name": "tilde", + "Description": "tilde test module", + "Version": "1.0", + "Libs": [ + {"Type": "LibraryPath", "Value": "~"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "~"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/tilde.pc b/tests/auto/pkgconfig/testdata/tilde.pc new file mode 100644 index 000000000..c3babc120 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/tilde.pc @@ -0,0 +1,5 @@ +Name: tilde +Description: tilde test module +Version: 1.0 +Libs: -L~ +Cflags: -I~ diff --git a/tests/auto/pkgconfig/testdata/variables.json b/tests/auto/pkgconfig/testdata/variables.json new file mode 100644 index 000000000..7565b6804 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/variables.json @@ -0,0 +1,17 @@ +{ + "Name": "Complex variables", + "Description": "Test complex variable output", + "Version": "1.0", + "Vars": { + "prefix": "/local", + "exec_prefix": "/local", + "libdir": "/local/lib", + "includedir": "\"/local/include\"", + "cppflags": "-I\"/local/include\"/foo -DFOO=\\\"/bar\\\"" + }, + "Cflags": [ + {"Type": "IncludePath", "Value": "/local/include"}, + {"Type": "IncludePath", "Value": "/local/include/foo"}, + {"Type": "Define", "Value": "FOO=\"/bar\""} + ] +} diff --git a/tests/auto/pkgconfig/testdata/variables.pc b/tests/auto/pkgconfig/testdata/variables.pc new file mode 100644 index 000000000..b27ab78e1 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/variables.pc @@ -0,0 +1,11 @@ +prefix=/local +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir="${prefix}/include" +cppflags=-I${includedir}/foo \ + -DFOO=\"/bar\" + +Name: Complex variables +Description: Test complex variable output +Version: 1.0 +Cflags: -I${includedir} ${cppflags} diff --git a/tests/auto/pkgconfig/testdata/whitespace.json b/tests/auto/pkgconfig/testdata/whitespace.json new file mode 100644 index 000000000..dcfa3ece3 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/whitespace.json @@ -0,0 +1,24 @@ +{ + "Name": "Whitespace test", + "Description": "Dummy pkgconfig test package for testing pkgconfig", + "Version": "1.0.0", + "Vars": { + "prefix": "/usr", + "exec_prefix": "/usr", + "libdir": "\"/usr/white space/lib\"", + "includedir": "\"/usr/white space/include\"" + }, + "Libs": [ + {"Type": "LibraryPath", "Value": "/usr/white space/lib"}, + {"Type": "LibraryName", "Value": "foo bar"}, + {"Type": "LibraryName", "Value": "bar baz"}, + {"Type": "LinkerFlag", "Value": "-r:foo"} + ], + "Cflags": [ + {"Type": "IncludePath", "Value": "/usr/white space/include"}, + {"Type": "IncludePath", "Value": "$(top_builddir)"}, + {"Type": "IncludePath", "Value": "include dir"}, + {"Type": "IncludePath", "Value": "other include dir"}, + {"Type": "Define", "Value": "lala=misc"} + ] +} diff --git a/tests/auto/pkgconfig/testdata/whitespace.pc b/tests/auto/pkgconfig/testdata/whitespace.pc new file mode 100644 index 000000000..693bbc4d0 --- /dev/null +++ b/tests/auto/pkgconfig/testdata/whitespace.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir="${exec_prefix}/white space/lib" +includedir="${prefix}/white space/include" + +Name: Whitespace test +Description: Dummy pkgconfig test package for testing pkgconfig +Version: 1.0.0 +Requires: +Libs: -L${libdir} -lfoo\ bar "-lbar baz" -r:foo +Cflags: -I${includedir} -I$(top_builddir) -Iinclude\ dir "-Iother include dir" -Dlala=misc |