| 1 | // Tests that the deprecated @VROOT alias still resolves to the nearest v.mod file, |
| 2 | // which in this case is in the current folder. |
| 3 | // ==> @VROOT/includes === ./includes |
| 4 | #flag -I@VROOT/includes |
| 5 | #include "myinclude.h" |
| 6 | |
| 7 | fn C.add(i32, i32) i32 |
| 8 | |
| 9 | // Tests that VEXEROOT works no matter the current folder. |
| 10 | #flag -I @VEXEROOT/thirdparty/stb_image |
| 11 | #include "stb_image.h" |
| 12 | |
| 13 | fn test_vroot_and_vmodroot() { |
| 14 | x := C.add(123, 456) |
| 15 | dump(x) |
| 16 | assert x == 579 |
| 17 | } |
| 18 |