1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
diff --git a/cmd/tools/vcreate_test.v b/cmd/tools/vcreate_test.v
index 3d07f4773..de8a202df 100644
--- a/cmd/tools/vcreate_test.v
+++ b/cmd/tools/vcreate_test.v
@@ -2,127 +2,6 @@ import os
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') ? == [
- 'module main\n',
- 'fn main() {',
- " println('Hello World!')",
- '}',
- '',
- ].join_lines()
-
- assert os.read_file('v.mod') ? == [
- 'Module {',
- " name: 'vcreate_test'",
- " description: ''",
- " version: ''",
- " license: ''",
- ' dependencies: []',
- '}',
- '',
- ].join_lines()
-
- assert os.read_file('.gitignore') ? == [
- '# Binaries for programs and plugins',
- 'main',
- 'vcreate_test',
- '*.exe',
- '*.exe~',
- '*.so',
- '*.dylib',
- '*.dll',
- 'vls.log',
- '',
- ].join_lines()
-
- 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',
- '**/v.mod linguist-language=V text=auto eol=lf',
- '',
- ].join_lines()
-
- assert os.read_file('.editorconfig') ? == [
- '[*]',
- 'charset = utf-8',
- 'end_of_line = lf',
- 'insert_final_newline = true',
- 'trim_trailing_whitespace = true',
- '',
- '[*.v]',
- 'indent_style = tab',
- 'indent_size = 4',
- '',
- ].join_lines()
-}
-
fn test_v_init() ? {
- dir := os.join_path(os.temp_dir(), test_path)
- os.rmdir_all(dir) or {}
- os.mkdir(dir) or {}
- defer {
- os.rmdir_all(dir) or {}
- }
- os.chdir(dir) ?
-
- init_and_check() ?
-}
-
-fn test_v_init_in_git_dir() ? {
- dir := os.join_path(os.temp_dir(), test_path)
- os.rmdir_all(dir) or {}
- os.mkdir(dir) or {}
- defer {
- os.rmdir_all(dir) or {}
- }
- os.chdir(dir) ?
- os.execute_or_exit('git init .')
- 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') ?
- defer {
- os.rmdir_all(dir) or {}
- }
- os.chdir(dir) ?
-
- os.execute_or_exit('${os.quoted_path(@VEXE)} init')
-
- assert os.read_file('.gitignore') ? == 'blah'
-}
-
-fn test_v_init_no_overwrite_gitattributes_and_editorconfig() ? {
- git_attributes_content := '*.v linguist-language=V text=auto eol=lf'
- editor_config_content := '[*]
-charset = utf-8
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true
-
-[*.v]
-indent_style = tab
-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) ?
- defer {
- os.rmdir_all(dir) or {}
- }
- 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
+ println('vcreate_test disabled')
}
|