Mercurial > vim
annotate src/testdir/test_job_fails.vim @ 32816:939396a5711c v9.0.1722
patch 9.0.1722: wrong error messages when passing wrong types to count()
Commit: https://github.com/vim/vim/commit/4f389e7c0fe7dfeccfa512a72fa36f9028d57159
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Aug 17 22:10:40 2023 +0200
patch 9.0.1722: wrong error messages when passing wrong types to count()
Problem: wrong error messages when passing wrong types to count()
Solution: fix it
This fixes two problems:
1. When passing wrong type to {ic} argument of count(), two error
messages are given, the second of which is misleading.
2. When passing wrong type to {comp} argument of count(), the error
message doesn't mention that {comp} may be a String.
closes: #12825
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 17 Aug 2023 22:15:03 +0200 |
parents | 08940efa6b4e |
children |
rev | line source |
---|---|
9764
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " This test is in a separate file, because it usually causes reports for memory |
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 " leaks under valgrind. That is because when fork/exec fails memory is not |
19724
b3e93a05c3ca
patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
13798
diff
changeset
|
3 " freed. Since the process exits right away it's not a real leak. |
9764
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
5 source check.vim |
9764
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 |
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 func Test_job_start_fails() |
21765
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
8 CheckFeature job |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
9 let job = job_start('axdfxsdf') |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
10 if has('unix') |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
11 call WaitForAssert({-> assert_equal("dead", job_status(job))}) |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
12 else |
08940efa6b4e
patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents:
19724
diff
changeset
|
13 call WaitForAssert({-> assert_equal("fail", job_status(job))}) |
9764
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 endif |
e0b783389bea
commit https://github.com/vim/vim/commit/46c4d4ac66aa2b129f4dcec9debfda606f72d4b3
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 endfunc |
19724
b3e93a05c3ca
patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
13798
diff
changeset
|
16 |
b3e93a05c3ca
patch 8.2.0418: code in eval.c not sufficiently covered by tests
Bram Moolenaar <Bram@vim.org>
parents:
13798
diff
changeset
|
17 " vim: shiftwidth=2 sts=2 expandtab |