1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

all: update chmod/chdir usages

This commit is contained in:
Alexander Medvednikov
2021-08-28 10:23:01 +03:00
parent 29f550158e
commit f731060caf
7 changed files with 19 additions and 19 deletions

View File

@ -1,7 +1,7 @@
import os
fn deep_glob() ? {
os.chdir(@VMODROOT)
os.chdir(@VMODROOT) ?
matches := os.glob('vlib/v/*/*.v') or { panic(err) }
assert matches.len > 10
assert 'vlib/v/ast/ast.v' in matches
@ -16,7 +16,7 @@ fn deep_glob() ? {
}
fn redeep_glob() ? {
os.chdir(@VMODROOT)
os.chdir(@VMODROOT) ?
matches := os.glob('vlib/v/**/*.v') or { panic(err) }
assert matches.len > 10
assert 'vlib/v/ast/ast.v' in matches
@ -39,7 +39,7 @@ fn test_glob_can_find_v_files_3_levels_deep() ? {
}
fn test_glob_can_find_files_in_current_folder() ? {
os.chdir(@VMODROOT)
os.chdir(@VMODROOT) ?
matches := os.glob('*') ?
assert '.gitignore' in matches
assert 'make.bat' in matches
@ -53,7 +53,7 @@ fn test_glob_can_find_files_in_current_folder() ? {
}
fn test_glob_can_be_used_with_multiple_patterns() ? {
os.chdir(@VMODROOT)
os.chdir(@VMODROOT) ?
matches := os.glob('*', 'cmd/tools/*') ?
assert 'README.md' in matches
assert 'Makefile' in matches
@ -66,7 +66,7 @@ fn test_glob_can_be_used_with_multiple_patterns() ? {
}
fn test_glob_star() ? {
os.chdir(@VMODROOT)
os.chdir(@VMODROOT) ?
matches := os.glob('*ake*') ?
assert 'Makefile' in matches
assert 'make.bat' in matches