mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: add os.symlink() function
This commit is contained in:

committed by
Alexander Medvednikov

parent
7518d2d0dc
commit
06fba73ab9
@ -237,3 +237,14 @@ fn cleanup_leftovers(){
|
||||
os.rm('ex1.txt')
|
||||
os.rm('ex2.txt')
|
||||
}
|
||||
|
||||
fn test_symlink() {
|
||||
$if windows { return }
|
||||
os.mkdir('symlink') or { panic(err) }
|
||||
os.symlink('symlink', 'symlink2') or { panic(err) }
|
||||
assert os.exists('symlink2')
|
||||
|
||||
// cleanup
|
||||
os.rm('symlink')
|
||||
os.rm('symlink2')
|
||||
}
|
||||
|
Reference in New Issue
Block a user