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

fmt: remove space in front of ? and ! (#14366)

This commit is contained in:
Daniel Däschle
2022-05-13 05:56:21 +02:00
committed by GitHub
parent df029da942
commit d679146a80
324 changed files with 1865 additions and 1879 deletions

View File

@ -5,7 +5,7 @@ const test_path = 'vcreate_test'
fn init_and_check() ? {
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('vcreate_test.v') ? == [
assert os.read_file('vcreate_test.v')? == [
'module main\n',
'fn main() {',
" println('Hello World!')",
@ -13,7 +13,7 @@ fn init_and_check() ? {
'',
].join_lines()
assert os.read_file('v.mod') ? == [
assert os.read_file('v.mod')? == [
'Module {',
" name: 'vcreate_test'",
" description: ''",
@ -24,7 +24,7 @@ fn init_and_check() ? {
'',
].join_lines()
assert os.read_file('.gitignore') ? == [
assert os.read_file('.gitignore')? == [
'# Binaries for programs and plugins',
'main',
'vcreate_test',
@ -37,7 +37,7 @@ fn init_and_check() ? {
'',
].join_lines()
assert os.read_file('.gitattributes') ? == [
assert os.read_file('.gitattributes')? == [
'*.v linguist-language=V text=auto eol=lf',
'*.vv linguist-language=V text=auto eol=lf',
'*.vsh linguist-language=V text=auto eol=lf',
@ -45,7 +45,7 @@ fn init_and_check() ? {
'',
].join_lines()
assert os.read_file('.editorconfig') ? == [
assert os.read_file('.editorconfig')? == [
'[*]',
'charset = utf-8',
'end_of_line = lf',
@ -66,9 +66,9 @@ fn test_v_init() ? {
defer {
os.rmdir_all(dir) or {}
}
os.chdir(dir) ?
os.chdir(dir)?
init_and_check() ?
init_and_check()?
}
fn test_v_init_in_git_dir() ? {
@ -78,24 +78,24 @@ fn test_v_init_in_git_dir() ? {
defer {
os.rmdir_all(dir) or {}
}
os.chdir(dir) ?
os.chdir(dir)?
os.execute_or_exit('git init .')
init_and_check() ?
init_and_check()?
}
fn test_v_init_no_overwrite_gitignore() ? {
dir := os.join_path(os.temp_dir(), test_path)
os.rmdir_all(dir) or {}
os.mkdir(dir) or {}
os.write_file('$dir/.gitignore', 'blah') ?
os.write_file('$dir/.gitignore', 'blah')?
defer {
os.rmdir_all(dir) or {}
}
os.chdir(dir) ?
os.chdir(dir)?
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('.gitignore') ? == 'blah'
assert os.read_file('.gitignore')? == 'blah'
}
fn test_v_init_no_overwrite_gitattributes_and_editorconfig() ? {
@ -114,15 +114,15 @@ indent_size = 4
dir := os.join_path(os.temp_dir(), test_path)
os.rmdir_all(dir) or {}
os.mkdir(dir) or {}
os.write_file('$dir/.gitattributes', git_attributes_content) ?
os.write_file('$dir/.editorconfig', editor_config_content) ?
os.write_file('$dir/.gitattributes', git_attributes_content)?
os.write_file('$dir/.editorconfig', editor_config_content)?
defer {
os.rmdir_all(dir) or {}
}
os.chdir(dir) ?
os.chdir(dir)?
os.execute_or_exit('${os.quoted_path(@VEXE)} init')
assert os.read_file('.gitattributes') ? == git_attributes_content
assert os.read_file('.editorconfig') ? == editor_config_content
assert os.read_file('.gitattributes')? == git_attributes_content
assert os.read_file('.editorconfig')? == editor_config_content
}