From c431d820e7be1c511d3d16e89cdffaa21b7909fa Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 4 Sep 2023 08:49:50 +0800 Subject: 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 --- test/unit/strings_spec.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'test') 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)) -- cgit