v2 / vlib / v / tests / project_with_modules_having_submodules / bin / main.vsh
14 lines · 10 sloc · 451 bytes · 1d5ed89138a448c118f78ca4ce8f9836e216e469
Raw
1#!/usr/local/bin/v run
2
3import v.tests.project_with_modules_having_submodules.mod1.submodule as m
4
5println('This script is located inside: ' + resource_abs_path(''))
6
7println('The result of calling m.f is: ' + m.f().str())
8
9/*
10NB: this main program v script is under bin/ ,
11but it *still* can find mod1, because the parent project has v.mod,
12so v module lookup for this bin/main.vsh file will find mod1 through
13relation to the parent ../v.mod file
14*/
15