0
0
mirror of https://github.com/vim/vim.git synced 2025-10-19 08:04:27 -04:00

patch 8.2.0886: cannot use octal numbers in scriptversion 4

Problem:    Cannot use octal numbers in scriptversion 4.
Solution:   Add the "0o" notation. (Ken Takata, closes #5304)
This commit is contained in:
Bram Moolenaar
2020-06-02 21:38:22 +02:00
parent 3ac498c8a1
commit c17e66c5c0
7 changed files with 48 additions and 20 deletions

View File

@@ -199,9 +199,12 @@ scriptversion 4
func Test_vvar_scriptversion4()
call assert_true(has('vimscript-4'))
call assert_equal(17, 017)
call assert_equal(15, 0o17)
call assert_equal(15, 0O17)
call assert_equal(18, 018)
call assert_equal(64, 0b1'00'00'00)
call assert_equal(1048576, 0x10'00'00)
call assert_equal(32768, 0o10'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())
@@ -211,6 +214,8 @@ endfunc
scriptversion 1
func Test_vvar_scriptversion1()
call assert_equal(15, 017)
call assert_equal(15, 0o17)
call assert_equal(15, 0O17)
call assert_equal(18, 018)
endfunc