]> git.madduck.net Git - etc/vim.git/blob - .vim/bundle/ale/test/handler/test_shell_handler.vader

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Merge commit '294584081929424aec883f90c7d6515b3743358d' as '.vim/bundle/vim-lsp-ale'
[etc/vim.git] / .vim / bundle / ale / test / handler / test_shell_handler.vader
1 Before:
2   runtime ale_linters/sh/shell.vim
3
4 After:
5   call ale#linter#Reset()
6
7 Execute(The shell handler should parse lines correctly):
8   AssertEqual
9   \ [
10   \   {
11   \     'lnum': 13,
12   \     'text': 'syntax error near unexpected token d',
13   \   },
14   \   {
15   \     'lnum': 7,
16   \     'text': 'line 42: line 36:',
17   \   },
18   \   {
19   \     'lnum': 11,
20   \     'text': 'Syntax error: "(" unexpected',
21   \   },
22   \   {
23   \     'lnum': 95,
24   \     'text': 'parse error near `out=$(( $1 / 1024. )...',
25   \   },
26   \   {
27   \     'lnum': 22,
28   \     'text': ':11: :33: :44:',
29   \   },
30   \   {
31   \     'lnum': 9,
32   \     'text': '`done'' unexpected',
33   \   },
34   \ ],
35   \ ale_linters#sh#shell#Handle(347, [
36   \   'bash: line 13: syntax error near unexpected token d',
37   \   'bash: line 7: line 42: line 36:',
38   \   'sh: 11: Syntax error: "(" unexpected',
39   \   'qfm:95: parse error near `out=$(( $1 / 1024. )...',
40   \   'qfm:22: :11: :33: :44:',
41   \   'foo.sh: syntax error at line 9: `done'' unexpected',
42   \ ])
43
44 Execute(The shell handler should parse Simplified Chinese lines correctly):
45   AssertEqual
46   \ [
47   \   {
48   \     'lnum': 0,
49   \     'text': '未预期的符号“done”附近有语法错误',
50   \   },
51   \   {
52   \     'lnum': 90,
53   \     'text': '寻找匹配的“"”时遇到了未预期的文件结束符',
54   \   },
55   \   {
56   \     'lnum': 111,
57   \     'text': '语法错误: 未预期的文件结尾',
58   \   },
59   \   {
60   \     'lnum': 22,
61   \     'text': ':11: :33: :44:',
62   \   },
63   \ ],
64   \ ale_linters#sh#shell#Handle(347, [
65   \   '/tmp/nvimWL5sOL/2/a.sh:行0: 未预期的符号“done”附近有语法错误',
66   \   '/tmp/nvimWL5sOL/2/a.sh:行90: 寻找匹配的“"”时遇到了未预期的文件结束符',
67   \   '/tmp/nvimWL5sOL/2/a.sh:行111: 语法错误: 未预期的文件结尾',
68   \   '/tmp/nvimWL5sOL/2/a.sh:行22: :11: :33: :44:',
69   \ ])
70
71 Execute(The shell handler should parse Traditional Chinese lines correctly):
72   AssertEqual
73   \ [
74   \   {
75   \     'lnum': 0,
76   \     'text': '未預期的字組「(」附近有語法錯誤',
77   \   },
78   \   {
79   \     'lnum': 90,
80   \     'text': '尋找匹配的「"」時遇到了未預期的檔案結束符',
81   \   },
82   \   {
83   \     'lnum': 111,
84   \     'text': '語法錯誤: 未預期的檔案結尾',
85   \   },
86   \   {
87   \     'lnum': 22,
88   \     'text': ':11: :33: :44:',
89   \   },
90   \ ],
91   \ ale_linters#sh#shell#Handle(347, [
92   \   '/tmp/nvimWL5sOL/2/a.sh: 列 0: 未預期的字組「(」附近有語法錯誤',
93   \   '/tmp/nvimWL5sOL/2/a.sh: 列 90: 尋找匹配的「"」時遇到了未預期的檔案結束符',
94   \   '/tmp/nvimWL5sOL/2/a.sh: 列 111: 語法錯誤: 未預期的檔案結尾',
95   \   '/tmp/nvimWL5sOL/2/a.sh: 列 22: :11: :33: :44:',
96   \ ])
97
98 Execute(The shell handler should parse Japanese lines correctly):
99   AssertEqual
100   \ [
101   \   {
102   \     'lnum': 0,
103   \     'text': "予期しないトークン `(' 周辺に構文エラーがあります",
104   \   },
105   \   {
106   \     'lnum': 90,
107   \     'text': "予期しないトークン `done' 周辺に構文エラーがあります",
108   \   },
109   \   {
110   \     'lnum': 111,
111   \     'text': "対応する `\"' を探索中に予期しないファイル終了 (EOF) です",
112   \   },
113   \   {
114   \     'lnum': 22,
115   \     'text': ':11: :33: :44:',
116   \   },
117   \ ],
118   \ ale_linters#sh#shell#Handle(347, [
119   \   "/tmp/nvimWL5sOL/2/a.sh: 行 0: 予期しないトークン `(' 周辺に構文エラーがあります",
120   \   "/tmp/nvimWL5sOL/2/a.sh: 行 90: 予期しないトークン `done' 周辺に構文エラーがあります",
121   \   "/tmp/nvimWL5sOL/2/a.sh: 行 111: 対応する `\"' を探索中に予期しないファイル終了 (EOF) です",
122   \   "/tmp/nvimWL5sOL/2/a.sh: 行 22: :11: :33: :44:",
123   \ ])
124
125 Execute(The shell handler should parse Greek lines correctly):
126   AssertEqual
127   \ [
128   \   {
129   \     'lnum': 0,
130   \     'text': 'συντακτικό σφάλμα κοντά στο μη αναμενόμενο σύμβολο «done»',
131   \   },
132   \   {
133   \     'lnum': 90,
134   \     'text': 'syntax error: μη αναμενόμενο τέλος αρχείου',
135   \   },
136   \   {
137   \     'lnum': 111,
138   \     'text': 'μη αναμενόμενο EOF κατά την αναζήτηση «"»',
139   \   },
140   \   {
141   \     'lnum': 22,
142   \     'text': ':11: :33: :44:',
143   \   },
144   \ ],
145   \ ale_linters#sh#shell#Handle(347, [
146   \   '/tmp/nvimWL5sOL/2/a.sh: γραμμή 0: συντακτικό σφάλμα κοντά στο μη αναμενόμενο σύμβολο «done»',
147   \   '/tmp/nvimWL5sOL/2/a.sh: γραμμή 90: syntax error: μη αναμενόμενο τέλος αρχείου',
148   \   '/tmp/nvimWL5sOL/2/a.sh: γραμμή 111: μη αναμενόμενο EOF κατά την αναζήτηση «"»',
149   \   "/tmp/nvimWL5sOL/2/a.sh: γραμμή 22: :11: :33: :44:",
150   \ ])
151
152 Execute(The shell handler should parse Russian lines correctly):
153   AssertEqual
154   \ [
155   \   {
156   \     'lnum': 0,
157   \     'text': 'синтаксическая ошибка рядом с неожиданным маркером «done»',
158   \   },
159   \   {
160   \     'lnum': 90,
161   \     'text': 'синтаксическая ошибка: неожиданный конец файла',
162   \   },
163   \   {
164   \     'lnum': 111,
165   \     'text': 'неожиданный конец файла во время поиска «"»',
166   \   },
167   \   {
168   \     'lnum': 22,
169   \     'text': ':11: :33: :44:',
170   \   },
171   \ ],
172   \ ale_linters#sh#shell#Handle(347, [
173   \   '/tmp/nvimWL5sOL/2/a.sh: строка 0: синтаксическая ошибка рядом с неожиданным маркером «done»',
174   \   '/tmp/nvimWL5sOL/2/a.sh: строка 90: синтаксическая ошибка: неожиданный конец файла',
175   \   '/tmp/nvimWL5sOL/2/a.sh: строка 111: неожиданный конец файла во время поиска «"»',
176   \   '/tmp/nvimWL5sOL/2/a.sh: строка 22: :11: :33: :44:',
177   \ ])