Translator from shell to V scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
401 B

module main
fn test_translate() {
assert translate([
'#!/bin/bash',
'',
'mv test1 test2',
'chmod 777 test2/file',
'chmod_example 777 test2/file',
'echo test test',
'echo_errors',
]) == [
'#!/usr/bin/env -S v run',
'',
"system('mv test1 test2')",
"chmod('test2/file', 777)",
"system('chmod_example 777 test2/file')",
"println('test test')",
"system('echo_errors')",
]
}