0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

patch 9.0.1257: code style is not check in test scripts

Problem:    Code style is not check in test scripts.
Solution:   Add basic code style check for test files.
This commit is contained in:
Bram Moolenaar
2023-01-28 19:19:03 +00:00
parent 04e4f1d985
commit 94722c5107
56 changed files with 247 additions and 208 deletions

View File

@@ -17,7 +17,7 @@ endfunc
func Test_gD()
let lines =<< trim [CODE]
int x;
int func(void)
{
return x;
@@ -30,7 +30,7 @@ endfunc
func Test_gD_too()
let lines =<< trim [CODE]
Filename x;
int Filename
int func() {
Filename x;
@@ -44,7 +44,7 @@ func Test_gD_comment()
let lines =<< trim [CODE]
/* int x; */
int x;
int func(void)
{
return x;
@@ -58,7 +58,7 @@ func Test_gD_inline_comment()
let lines =<< trim [CODE]
int y /* , x */;
int x;
int func(void)
{
return x;
@@ -72,7 +72,7 @@ func Test_gD_string()
let lines =<< trim [CODE]
char *s[] = "x";
int x = 1;
int func(void)
{
return x;
@@ -85,7 +85,7 @@ endfunc
func Test_gD_string_same_line()
let lines =<< trim [CODE]
char *s[] = "x", int x = 1;
int func(void)
{
return x;
@@ -99,7 +99,7 @@ func Test_gD_char()
let lines =<< trim [CODE]
char c = 'x';
int x = 1;
int func(void)
{
return x;
@@ -112,7 +112,7 @@ endfunc
func Test_gd()
let lines =<< trim [CODE]
int x;
int func(int x)
{
return x;
@@ -146,7 +146,7 @@ func Test_gd_not_local()
{
return x;
}
int func2(int x)
{
return x;
@@ -173,9 +173,9 @@ func Test_gd_missing_braces()
def func1(a)
a + 1
end
a = 1
def func2()
return a
end
@@ -252,11 +252,11 @@ func Test_gd_inline_comment_body()
int func(void)
{
int y /* , x */;
for (/* int x = 0 */; y < 2; y++);
int x = 0;
return x;
}
[CODE]
@@ -292,7 +292,7 @@ func Test_gd_string()
{
char *s = "x";
int x = 1;
return x;
}
[CODE]
@@ -304,7 +304,7 @@ func Test_gd_string_only()
int func(void)
{
char *s = "x";
return x;
}
[CODE]
@@ -341,7 +341,7 @@ func Test_gd_local_block()
char *b = "NULL";
return b;
}
return 0;
}
[CODE]