v test-all: add a `v run examples/v_script.vsh` step too

pull/11459/head
Delyan Angelov 2021-09-10 12:43:53 +03:00
parent bdd053fcf1
commit 6ea750da8d
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
3 changed files with 12 additions and 7 deletions

View File

@ -107,9 +107,10 @@ jobs:
run: ./v -W build-tools
- name: Test v binaries
run: ./v build-vbinaries
- name: Run a VSH script
run: ./v run examples/v_script.vsh
- name: Test v tutorials
run: |
./v tutorials/building_a_simple_web_blog_with_vweb/code/blog
run: ./v tutorials/building_a_simple_web_blog_with_vweb/code/blog
- name: Build cmd/tools/fast
run: cd cmd/tools/fast && ../../../v fast.v && ./fast

View File

@ -68,6 +68,10 @@ fn get_all_commands() []Command {
okmsg: 'V prints the generated source code to stdout with `-o -` .'
}
}
res << Command{
line: '$vexe run examples/v_script.vsh'
okmsg: 'V can run the .VSH script file examples/v_script.vsh'
}
res << Command{
line: '$vexe -o vtmp cmd/v'
okmsg: 'V can compile itself.'

View File

@ -9,10 +9,10 @@ for _ in 0 .. 3 {
}
println('\nMaking dir "v_script_dir".')
mkdir('v_script_dir')
mkdir('v_script_dir') ?
println("\nEntering into v_script_dir and listing it's files.")
chdir('v_script_dir')
chdir('v_script_dir') ?
files := ls('.') or { panic(err.msg) }
println(files)
@ -24,9 +24,9 @@ again_ls := ls('.') or { panic(err.msg) }
println(again_ls)
println('\nRemoving foo.txt and v_script_dir')
rm('foo.txt')
chdir('../')
rmdir('v_script_dir')
rm('foo.txt') ?
chdir('../') ?
rmdir('v_script_dir') ?
print('\nDoes v_script_dir still exist? ')
println(exists('v_script_dir'))