16 lines
330 B
V
16 lines
330 B
V
module pref
|
|
|
|
import os
|
|
|
|
fn test_detect_vroot_from_subdir() {
|
|
vroot := @VMODROOT
|
|
v3_dir := os.join_path(vroot, 'vlib', 'v3')
|
|
assert detect_vroot_from(v3_dir) == vroot
|
|
}
|
|
|
|
fn test_detect_vroot_from_binary_path() {
|
|
vroot := @VMODROOT
|
|
v3_bin := os.join_path(vroot, 'vlib', 'v3', 'v3')
|
|
assert detect_vroot_from(v3_bin) == vroot
|
|
}
|