]> git.madduck.net Git - etc/vim.git/blobdiff - .vim/bundle/ale/test/sign/test_sign_parsing.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 '76265755a1add77121c8f9dabb3e9bb70fe9a972' as '.vim/bundle/ale'
[etc/vim.git] / .vim / bundle / ale / test / sign / test_sign_parsing.vader
diff --git a/.vim/bundle/ale/test/sign/test_sign_parsing.vader b/.vim/bundle/ale/test/sign/test_sign_parsing.vader
new file mode 100644 (file)
index 0000000..fb5f397
--- /dev/null
@@ -0,0 +1,88 @@
+Execute (Parsing English signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[9, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns([
+    \   'Signs for app.js:',
+    \   '    line=9  id=1000001  group=ale_signs  name=ALEWarningSign',
+    \ ])
+  else
+    AssertEqual
+    \ [0, [[9, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns([
+    \   'Signs for app.js:',
+    \   '    line=9  id=1000001  name=ALEWarningSign',
+    \ ])
+  endif
+
+Execute (Parsing Russian signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns(['    строка=1  id=1000001  группа=ale_signs  имя=ALEErrorSign'])
+  else
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns(['    строка=1  id=1000001  имя=ALEErrorSign'])
+  endif
+
+Execute (Parsing Japanese signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    行=1  識別子=1000001  グループ=ale_signs  名前=ALEWarningSign'])
+  else
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    行=1  識別子=1000001  名前=ALEWarningSign'])
+  endif
+
+Execute (Parsing Spanish signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[12, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    línea=12 id=1000001  grupo=ale_signs  nombre=ALEWarningSign'])
+  else
+    AssertEqual
+    \ [0, [[12, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    línea=12 id=1000001  nombre=ALEWarningSign'])
+  endif
+
+Execute (Parsing Italian signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    riga=1 id=1000001, gruppo=ale_signs  nome=ALEWarningSign'])
+  else
+    AssertEqual
+    \ [0, [[1, 1000001, 'ALEWarningSign']]],
+    \ ale#sign#ParseSigns(['    riga=1 id=1000001, nome=ALEWarningSign'])
+  endif
+
+Execute (Parsing German signs should work):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [0, [[235, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns(['    Zeile=235  id=1000001 Gruppe=ale_signs  Name=ALEErrorSign'])
+  else
+    AssertEqual
+    \ [0, [[235, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns(['  Zeile=235  id=1000001 Name=ALEErrorSign'])
+  endif
+
+Execute (The sign parser should indicate if the dummy sign is set):
+  if has('nvim-0.4.2') || has('patch-8.1.614')
+    AssertEqual
+    \ [1, [[1, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns([
+    \   '    строка=1  id=1000001  group=ale_signs  имя=ALEErrorSign',
+    \   '    line=1  id=1000000  group=ale_signs  name=ALEDummySign',
+    \ ])
+  else
+    AssertEqual
+    \ [1, [[1, 1000001, 'ALEErrorSign']]],
+    \ ale#sign#ParseSigns([
+    \   '    строка=1  id=1000001  имя=ALEErrorSign',
+    \   '    line=1  id=1000000  name=ALEDummySign',
+    \ ])
+  endif