aboutsummaryrefslogtreecommitdiff
path: root/test/unit/strings_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-09-04 08:49:50 +0800
committerGitHub <noreply@github.com>2023-09-04 08:49:50 +0800
commitc431d820e7be1c511d3d16e89cdffaa21b7909fa (patch)
treed79dcb6ea3c16021d253e4b2e8fe617dfe0dcf4d /test/unit/strings_spec.lua
parentc50951a4d0cf480aa138a2ed2bd2deedebeb0dec (diff)
downloadrneovim-c431d820e7be1c511d3d16e89cdffaa21b7909fa.tar.gz
rneovim-c431d820e7be1c511d3d16e89cdffaa21b7909fa.tar.bz2
rneovim-c431d820e7be1c511d3d16e89cdffaa21b7909fa.zip
vim-patch:9.0.1856: issues with formatting positional arguments (#25013)
Problem: issues with formatting positional arguments Solution: fix them, add tests and documentation closes: vim/vim#12140 closes: vim/vim#12985 Tentatively fix message_test. Check NULL ptr. https://github.com/vim/vim/commit/aa90d4f031f73a34aaef5746931ea746849a2231 Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
Diffstat (limited to 'test/unit/strings_spec.lua')
-rw-r--r--test/unit/strings_spec.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/unit/strings_spec.lua b/test/unit/strings_spec.lua
index 04d11d8f04..6d7aceb4b2 100644
--- a/test/unit/strings_spec.lua
+++ b/test/unit/strings_spec.lua
@@ -208,6 +208,7 @@ describe('vim_snprintf()', function()
a('three one two', buf, bsize, '%3$s %1$s %2$s', 'one', 'two', 'three')
a('1234567', buf, bsize, '%1$d', i(1234567))
a('deadbeef', buf, bsize, '%1$x', u(0xdeadbeef))
+ a('001100', buf, bsize, '%2$0*1$b', i(6), u(12))
a('001100', buf, bsize, '%1$0.*2$b', u(12), i(6))
a('one two', buf, bsize, '%1$s %2$s', 'one', 'two')
a('001100', buf, bsize, '%06b', u(12))