0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.1.2043: not sufficient testing for quoted numbers

Problem:    Not sufficient testing for quoted numbers.
Solution:   Add a few more test cases.
This commit is contained in:
Bram Moolenaar
2019-09-15 21:12:22 +02:00
parent 9c658c9eac
commit ea8dcf8346
3 changed files with 6 additions and 0 deletions

View File

@@ -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'))