travis: re-write the vget test in V

pull/2121/head
Alexander Medvednikov 2019-09-28 14:40:09 +03:00
parent 46ac22f3e5
commit dc28c787d1
2 changed files with 15 additions and 7 deletions

View File

@ -87,10 +87,3 @@ script:
git clone https://github.com/vlang/vid
cd vid && ../v -debug -o vid .
fi
- |
if [[ "${TRAVIS_OS_NAME}" != "windows" ]]; then
v install nedpals.args
# ensure nedpals.args is installed
[[ -d ~/.vmodules/nedpals/args]]
git remote -v | grep 'https://github.com/nedpals/v-args (fetch)'
fi

View File

@ -1023,6 +1023,19 @@ fn install_v(args[]string) {
}
}
fn (v &V) test_vget() {
ret := os.system('v install nedpals.args')
if ret != 0 {
println('failed to run v install')
exit(1)
}
if !os.file_exists(ModPath + '/nedpals/args') {
println('v failed to install a test module')
exit(1)
}
println('vget is OK')
}
fn (v &V) test_v() {
if !os.dir_exists('vlib') {
println('run "v test v" next to the vlib/ directory')
@ -1102,6 +1115,8 @@ fn (v &V) test_v() {
bmark.stop()
println( bmark.total_message('building examples') )
v.test_vget()
if failed {
exit(1)
}