aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorAndré Twupack <atwupack@mailbox.org>2014-07-12 18:39:23 +0200
committerAndré Twupack <atwupack@mailbox.org>2014-09-13 19:10:18 +0200
commit9f252554e31bb24a5d75607c47a2a71b770a681c (patch)
tree270c1c4a2a17f5f74e74ad7eabd52d49efd34cd6 /src/nvim/testdir
parent1761a4af711410076e6fdb5f727a83ee54ff5988 (diff)
downloadrneovim-9f252554e31bb24a5d75607c47a2a71b770a681c.tar.gz
rneovim-9f252554e31bb24a5d75607c47a2a71b770a681c.tar.bz2
rneovim-9f252554e31bb24a5d75607c47a2a71b770a681c.zip
vim-patch:7.4.341
Problem: sort() doesn't handle numbers well. Solution: Add an argument to specify sorting on numbers. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=adc4a84f72eb44dae657af713922a6e2c1f64ae3
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test55.in5
-rw-r--r--src/nvim/testdir/test55.ok4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/nvim/testdir/test55.in b/src/nvim/testdir/test55.in
index 85a8063774..f12dc2d22f 100644
--- a/src/nvim/testdir/test55.in
+++ b/src/nvim/testdir/test55.in
@@ -332,6 +332,11 @@ let l = [0, 1, 2, 3]
:$put =string(reverse(sort(l)))
:$put =string(sort(reverse(sort(l))))
:$put =string(uniq(sort(l)))
+:let l=[7, 9, 18, 12, 22, 10.0e-16, -1, 0xff, 0, -0, 0.22, 'foo', 'FOOBAR',{}, []]
+:$put =string(sort(copy(l), 'n'))
+:$put =string(sort(copy(l), 1))
+:$put =string(sort(copy(l), 'i'))
+:$put =string(sort(copy(l)))
:"
:" splitting a string to a List
:$put =string(split(' aa bb '))
diff --git a/src/nvim/testdir/test55.ok b/src/nvim/testdir/test55.ok
index be476e8e93..901bc94066 100644
--- a/src/nvim/testdir/test55.ok
+++ b/src/nvim/testdir/test55.ok
@@ -101,6 +101,10 @@ caught a:000[3]
[[0, 1, 2], [0, 1, 2], 4, 2, 2, 1.5, 'xaaa', 'x8', 'foo6', 'foo', 'foo', 'A11', '-0']
['-0', 'A11', 'foo', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 2, 4, [0, 1, 2], [0, 1, 2]]
['-0', 'A11', 'foo', 'foo6', 'x8', 'xaaa', 1.5, 2, 4, [0, 1, 2]]
+[-1, 0, 0, 'foo', 'FOOBAR', {}, [], 1.0e-15, 0.22, 7, 9, 12, 18, 22, 255]
+['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+['foo', 'FOOBAR', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
+['FOOBAR', 'foo', -1, 0, 0, 0.22, 1.0e-15, 12, 18, 22, 255, 7, 9, [], {}]
['aa', 'bb']
['aa', 'bb']
['', 'aa', 'bb', '']