| 1 | module pref |
| 2 | |
| 3 | import os |
| 4 | |
| 5 | // test_detect_vroot_from_subdir validates detect vroot from subdir behavior in v3 tests. |
| 6 | fn test_detect_vroot_from_subdir() { |
| 7 | vroot := @VMODROOT |
| 8 | v3_dir := os.join_path(vroot, 'vlib', 'v3') |
| 9 | assert detect_vroot_from(v3_dir) == vroot |
| 10 | } |
| 11 | |
| 12 | // test_detect_vroot_from_binary_path validates this v3 regression case. |
| 13 | fn test_detect_vroot_from_binary_path() { |
| 14 | vroot := @VMODROOT |
| 15 | v3_bin := os.join_path(vroot, 'vlib', 'v3', 'v3') |
| 16 | assert detect_vroot_from(v3_bin) == vroot |
| 17 | } |
| 18 | |