mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: change optional to result of io (#16075)
This commit is contained in:
@ -73,25 +73,25 @@ fn main() {
|
||||
},
|
||||
]
|
||||
|
||||
fn run_individual_test(case BumpTestCase) ? {
|
||||
fn run_individual_test(case BumpTestCase) ! {
|
||||
test_file := os.join_path_single(tfolder, case.file_name)
|
||||
|
||||
os.rm(test_file) or {}
|
||||
os.write_file(test_file, case.contents)?
|
||||
os.write_file(test_file, case.contents)!
|
||||
//
|
||||
os.execute_or_exit('${os.quoted_path(vexe)} bump --patch ${os.quoted_path(test_file)}')
|
||||
patch_lines := os.read_lines(test_file)?
|
||||
patch_lines := os.read_lines(test_file)!
|
||||
assert patch_lines[case.line] == case.expected_patch
|
||||
|
||||
os.execute_or_exit('${os.quoted_path(vexe)} bump --minor ${os.quoted_path(test_file)}')
|
||||
minor_lines := os.read_lines(test_file)?
|
||||
minor_lines := os.read_lines(test_file)!
|
||||
assert minor_lines[case.line] == case.expected_minor
|
||||
|
||||
os.execute_or_exit('${os.quoted_path(vexe)} bump --major ${os.quoted_path(test_file)}')
|
||||
major_lines := os.read_lines(test_file)?
|
||||
major_lines := os.read_lines(test_file)!
|
||||
assert major_lines[case.line] == case.expected_major
|
||||
//
|
||||
os.rm(test_file)?
|
||||
os.rm(test_file)!
|
||||
}
|
||||
|
||||
fn test_all_bump_cases() {
|
||||
|
Reference in New Issue
Block a user