diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ff08520393..a9edbc19bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,8 @@ jobs: # run: ./v -o hi.js examples/hello_v_js.v && node hi.js - name: Test symlink run: ./v symlink && v -o v2 v.v + - name: Test vsh + run: ./v examples/v_script.vsh - name: Test vid run: | git clone --depth 1 https://github.com/vlang/vid.git diff --git a/examples/v_script.vsh b/examples/v_script.vsh index cab85e7794..4ca6cbdd8f 100644 --- a/examples/v_script.vsh +++ b/examples/v_script.vsh @@ -1,39 +1,39 @@ -fn main() { - - for _ in 0..5 { - println('V script') - } - - println('deploying...') - - println('Files') - foo := ls('.') or { panic(err) } - println(foo) - - println('') - rm('a.out') - - println('Making dir name and creating foo.txt') - mkdir('name') - create('foo.txt') - - foo_ls := ls('.') or { panic(err) } - println(foo_ls) - println('') - - println('Entering into name') - chdir('name') - foo_ls2 := ls('.') or { panic(err) } - println(foo_ls2) - println('') - - println('Removing name and foo.txt') - println('') - chdir('../') - rmdir('name') - rm('foo.txt') - - again := ls('.') or { panic(err) } - println(again) - -} +fn main() { + + for _ in 0..5 { + println('V script') + } + + println('deploying...') + + println('Files') + foo := ls('.') or { panic(err) } + println(foo) + + println('') + rm('a.out') + + println('Making dir name and creating foo.txt') + os.mkdir('name')? // TODO mkdir() + create('foo.txt')? + + foo_ls := ls('.') or { panic(err) } + println(foo_ls) + println('') + + println('Entering into name') + chdir('name') + foo_ls2 := ls('.') or { panic(err) } + println(foo_ls2) + println('') + + println('Removing name and foo.txt') + println('') + chdir('../') + rmdir('name') + rm('foo.txt') + + again := ls('.') or { panic(err) } + println(again) + +}