1#!/usr/bin/env atf-sh 2 3. $(atf_get_srcdir)/test_env.sh 4 5tests_init \ 6 modversion \ 7 variable \ 8 define_variable \ 9 global_variable 10 11modversion_body() 12{ 13 export PKG_CONFIG_PATH="${selfdir}/lib1" 14 atf_check \ 15 -o inline:"1.0.1 \n" \ 16 pkgconf --modversion pkg-config 17} 18 19variable_body() 20{ 21 export PKG_CONFIG_PATH="${selfdir}/lib1" 22 atf_check \ 23 -o inline:"/test \n" \ 24 pkgconf --variable=prefix foo 25} 26 27define_variable_body() 28{ 29 export PKG_CONFIG_PATH="${selfdir}/lib1" 30 atf_check \ 31 -o inline:"/test2 \n" \ 32 pkgconf --define-variable=prefix=/test2 --variable=prefix foo 33} 34 35global_variable_body() 36{ 37 export PKG_CONFIG_PATH="${selfdir}/lib1" 38 atf_check \ 39 -o inline:"${selfdir}/lib1 \n" 40 pkgconf --exists -foo 41} 42 43argv_parse_3_body() 44{ 45 export PKG_CONFIG_PATH="${selfdir}/lib1" 46 atf_check \ 47 -o inline:"-llib-1 -pthread /test/lib/lib2.so \n" \ 48 pkgconf --libs argv-parse-3 49} 50 51tilde_quoting_body() 52{ 53 export PKG_CONFIG_PATH="${selfdir}/lib1" 54 atf_check \ 55 -o inline:"-L~ -ltilde \n" \ 56 pkgconf --libs tilde-quoting 57 atf_check \ 58 -o inline:"-I~ \n" \ 59 pkgconf --cflags tilde-quoting 60} 61 62paren_quoting_body() 63{ 64 export PKG_CONFIG_PATH="${selfdir}/lib1" 65 atf_check \ 66 -o inline:"-L\$(libdir) -ltilde \n" \ 67 pkgconf --libs paren-quoting 68} 69