| 1 | import os |
| 2 | |
| 3 | const vexe = os.getenv('VEXE') |
| 4 | |
| 5 | const vroot = os.dir(vexe) |
| 6 | |
| 7 | fn test_pkgconfig_can_be_compiled() { |
| 8 | tmp_exe := os.join_path(os.vtmp_dir(), '${os.getpid()}_pkgconfig.exe') |
| 9 | pkgconfig_v_file := os.real_path(os.join_path(vroot, 'vlib/v/pkgconfig/bin/pkgconfig.v')) |
| 10 | assert !os.exists(tmp_exe) |
| 11 | res := |
| 12 | os.system('${os.quoted_path(vexe)} -o ${os.quoted_path(tmp_exe)} ${os.quoted_path(pkgconfig_v_file)}') |
| 13 | if res != 0 { |
| 14 | assert false |
| 15 | } |
| 16 | assert os.exists(tmp_exe) |
| 17 | os.rm(tmp_exe)! |
| 18 | } |
| 19 | |