forked from aniani/vim
		
	patch 8.0.0025
Problem: Inconsistent use of spaces vs tabs in gd test. Solution: Use tabs. (Anton Lindqvist)
This commit is contained in:
		| @@ -16,13 +16,13 @@ endfunc | |||||||
|  |  | ||||||
| func Test_gD() | func Test_gD() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int x;', | 	\ 'int x;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 1, 5) |   call XTest_goto_decl('gD', lines, 1, 5) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| @@ -40,236 +40,236 @@ endfunc | |||||||
|  |  | ||||||
| func Test_gD_comment() | func Test_gD_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ '/* int x; */', | 	\ '/* int x; */', | ||||||
|     \ 'int x;', | 	\ 'int x;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 2, 5) |   call XTest_goto_decl('gD', lines, 2, 5) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gD_inline_comment() | func Test_gD_inline_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int y /* , x */;', | 	\ 'int y /* , x */;', | ||||||
|     \ 'int x;', | 	\ 'int x;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 2, 5) |   call XTest_goto_decl('gD', lines, 2, 5) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gD_string() | func Test_gD_string() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'char *s[] = "x";', | 	\ 'char *s[] = "x";', | ||||||
|     \ 'int x = 1;', | 	\ 'int x = 1;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 2, 5) |   call XTest_goto_decl('gD', lines, 2, 5) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gD_string_same_line() | func Test_gD_string_same_line() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'char *s[] = "x", int x = 1;', | 	\ 'char *s[] = "x", int x = 1;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 1, 22) |   call XTest_goto_decl('gD', lines, 1, 22) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gD_char() | func Test_gD_char() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ "char c = 'x';", | 	\ "char c = 'x';", | ||||||
|     \ 'int x = 1;', | 	\ 'int x = 1;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gD', lines, 2, 5) |   call XTest_goto_decl('gD', lines, 2, 5) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd() | func Test_gd() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int x;', | 	\ 'int x;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func(int x)', | 	\ 'int func(int x)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 3, 14) |   call XTest_goto_decl('gd', lines, 3, 14) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_not_local() | func Test_gd_not_local() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func1(void)', | 	\ 'int func1(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'int func2(int x)', | 	\ 'int func2(int x)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 3, 10) |   call XTest_goto_decl('gd', lines, 3, 10) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_kr_style() | func Test_gd_kr_style() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(x)', | 	\ 'int func(x)', | ||||||
|     \ '  int x;', | 	\ '  int x;', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 2, 7) |   call XTest_goto_decl('gd', lines, 2, 7) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_missing_braces() | func Test_gd_missing_braces() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'def func1(a)', | 	\ 'def func1(a)', | ||||||
|     \ '  a + 1', | 	\ '  a + 1', | ||||||
|     \ 'end', | 	\ 'end', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'a = 1', | 	\ 'a = 1', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ 'def func2()', | 	\ 'def func2()', | ||||||
|     \ '  return a', | 	\ '  return a', | ||||||
|     \ 'end', | 	\ 'end', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 1, 11) |   call XTest_goto_decl('gd', lines, 1, 11) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_comment() | func Test_gd_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  /* int x; */', | 	\ '  /* int x; */', | ||||||
|     \ '  int x;', | 	\ '  int x;', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \] | 	\] | ||||||
|   call XTest_goto_decl('gd', lines, 4, 7) |   call XTest_goto_decl('gd', lines, 4, 7) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_comment_in_string() | func Test_gd_comment_in_string() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  char *s ="//"; int x;', | 	\ '  char *s ="//"; int x;', | ||||||
|     \ '  int x;', | 	\ '  int x;', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \] | 	\] | ||||||
|   call XTest_goto_decl('gd', lines, 3, 22) |   call XTest_goto_decl('gd', lines, 3, 22) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_string_in_comment() | func Test_gd_string_in_comment() | ||||||
|   set comments= |   set comments= | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  /* " */ int x;', | 	\ '  /* " */ int x;', | ||||||
|     \ '  int x;', | 	\ '  int x;', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \] | 	\] | ||||||
|   call XTest_goto_decl('gd', lines, 3, 15) |   call XTest_goto_decl('gd', lines, 3, 15) | ||||||
|   set comments& |   set comments& | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_inline_comment() | func Test_gd_inline_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(/* x is an int */ int x)', | 	\ 'int func(/* x is an int */ int x)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 1, 32) |   call XTest_goto_decl('gd', lines, 1, 32) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_inline_comment_only() | func Test_gd_inline_comment_only() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void) /* one lonely x */', | 	\ 'int func(void) /* one lonely x */', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 3, 10) |   call XTest_goto_decl('gd', lines, 3, 10) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_inline_comment_body() | func Test_gd_inline_comment_body() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  int y /* , x */;', | 	\ '  int y /* , x */;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ '  for (/* int x = 0 */; y < 2; y++);', | 	\ '  for (/* int x = 0 */; y < 2; y++);', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ '  int x = 0;', | 	\ '  int x = 0;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|   \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 7, 7) |   call XTest_goto_decl('gd', lines, 7, 7) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_trailing_multiline_comment() | func Test_gd_trailing_multiline_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(int x) /* x is an int */', | 	\ 'int func(int x) /* x is an int */', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 1, 14) |   call XTest_goto_decl('gd', lines, 1, 14) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_trailing_comment() | func Test_gd_trailing_comment() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(int x) // x is an int', | 	\ 'int func(int x) // x is an int', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 1, 14) |   call XTest_goto_decl('gd', lines, 1, 14) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_string() | func Test_gd_string() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  char *s = "x";', | 	\ '  char *s = "x";', | ||||||
|     \ '  int x = 1;', | 	\ '  int x = 1;', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 4, 7) |   call XTest_goto_decl('gd', lines, 4, 7) | ||||||
| endfunc | endfunc | ||||||
|  |  | ||||||
| func Test_gd_string_only() | func Test_gd_string_only() | ||||||
|   let lines = [ |   let lines = [ | ||||||
|     \ 'int func(void)', | 	\ 'int func(void)', | ||||||
|     \ '{', | 	\ '{', | ||||||
|     \ '  char *s = "x";', | 	\ '  char *s = "x";', | ||||||
|     \ '', | 	\ '', | ||||||
|     \ '  return x;', | 	\ '  return x;', | ||||||
|     \ '}', | 	\ '}', | ||||||
|     \ ] | 	\ ] | ||||||
|   call XTest_goto_decl('gd', lines, 5, 10) |   call XTest_goto_decl('gd', lines, 5, 10) | ||||||
| endfunc | endfunc | ||||||
|   | |||||||
| @@ -764,6 +764,8 @@ static char *(features[]) = | |||||||
|  |  | ||||||
| static int included_patches[] = | static int included_patches[] = | ||||||
| {   /* Add new patch number below this line */ | {   /* Add new patch number below this line */ | ||||||
|  | /**/ | ||||||
|  |     25, | ||||||
| /**/ | /**/ | ||||||
|     24, |     24, | ||||||
| /**/ | /**/ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user