diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-09-15 21:12:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-09-15 21:12:22 +0200 |
commit | ea8dcf8346f488786023fd03ec1c013cda243040 (patch) | |
tree | 1ee31f0b95da559f2345583cdcca3e451746caad | |
parent | 9c658c9eacbd97e2c071f652a0155f71db94c0f3 (diff) | |
download | vim-git-ea8dcf8346f488786023fd03ec1c013cda243040.tar.gz |
patch 8.1.2043: not sufficient testing for quoted numbersv8.1.2043
Problem: Not sufficient testing for quoted numbers.
Solution: Add a few more test cases.
-rw-r--r-- | src/testdir/test_eval_stuff.vim | 3 | ||||
-rw-r--r-- | src/testdir/test_functions.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/testdir/test_eval_stuff.vim b/src/testdir/test_eval_stuff.vim index 4e8b782f1..ec566da04 100644 --- a/src/testdir/test_eval_stuff.vim +++ b/src/testdir/test_eval_stuff.vim @@ -200,6 +200,9 @@ func Test_vvar_scriptversion4() call assert_equal(64, 0b1'00'00'00) call assert_equal(1048576, 0x10'00'00) call assert_equal(1000000, 1'000'000) + call assert_equal("1234", execute("echo 1'234")->trim()) + call assert_equal('1 234', execute("echo 1''234")->trim()) + call assert_fails("echo 1'''234", 'E115:') endfunc scriptversion 1 diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index e78206188..37aba38f9 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -161,6 +161,7 @@ func Test_str2nr() call assert_equal(256, str2nr("1'0000'0000", 2, 1)) call assert_equal(262144, str2nr("1'000'000", 8, 1)) call assert_equal(1000000, str2nr("1'000'000", 10, 1)) + call assert_equal(1000, str2nr("1'000''000", 10, 1)) call assert_equal(65536, str2nr("1'00'00", 16, 1)) call assert_equal(0, str2nr('0x10')) diff --git a/src/version.c b/src/version.c index e9a71a88c..919d8fdf3 100644 --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2043, +/**/ 2042, /**/ 2041, |