aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-20 17:45:51 +0900
committerwatiko <service@mail.watiko.net>2016-03-02 17:32:24 +0900
commit313810ccada3b5f3dad73d8c376652533636f46b (patch)
tree384396be13e65ee2565fe7aa255a49c1c2c49d05 /test
parentf6dca79f3aa2b55927a5f1cee4a6bf25d5c9bd37 (diff)
downloadrneovim-313810ccada3b5f3dad73d8c376652533636f46b.tar.gz
rneovim-313810ccada3b5f3dad73d8c376652533636f46b.tar.bz2
rneovim-313810ccada3b5f3dad73d8c376652533636f46b.zip
vim-patch:7.4.1143
Problem: Can't sort on floating point numbers. Solution: Add the "f" flag to ":sort". (Alex Jakushev) Also add the "f" flag to sort(). https://github.com/vim/vim/commit/f7edf40448a09e04eec3bd05e043f7fea93b07c9
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/057_sort_spec.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/functional/legacy/057_sort_spec.lua b/test/functional/legacy/057_sort_spec.lua
index 7eed31e292..36062ded3a 100644
--- a/test/functional/legacy/057_sort_spec.lua
+++ b/test/functional/legacy/057_sort_spec.lua
@@ -668,4 +668,22 @@ describe(':sort', function()
b0b101100
b0b111000]])
end)
+
+ it('float', function()
+ insert([[
+ 1.234
+ 0.88
+ 123.456
+ 1.15e-6
+ -1.1e3
+ -1.01e3]])
+ execute([[sort f]])
+ expect([[
+ -1.1e3
+ -1.01e3
+ 1.15e-6
+ 0.88
+ 1.234
+ 123.456]])
+ end)
end)