1 Tests for :sort command. vim: set ft=vim :
6 :/^t01:/+1,/^t02/-1sort
7 :/^t02:/+1,/^t03/-1sort n
8 :/^t03:/+1,/^t04/-1sort x
9 :/^t04:/+1,/^t05/-1sort u
10 :/^t05:/+1,/^t06/-1sort!
11 :/^t06:/+1,/^t07/-1sort! n
12 :/^t07:/+1,/^t08/-1sort! u
13 :/^t08:/+1,/^t09/-1sort o
14 :/^t09:/+1,/^t10/-1sort! x
15 :/^t10:/+1,/^t11/-1sort/./
16 :/^t11:/+1,/^t12/-1sort/../
17 :/^t12:/+1,/^t13/-1sort/../u
18 :/^t13:/+1,/^t14/-1sort/./n
19 :/^t14:/+1,/^t15/-1sort/./r
20 :/^t15:/+1,/^t16/-1sort/../r
21 :/^t16:/+1,/^t17/-1sort/./rn
22 :/^t17:/+1,/^t18/-1sort/\d/
23 :/^t18:/+1,/^t19/-1sort/\d/r
24 :/^t19:/+1,/^t20/-1sort/\d/n
25 :/^t20:/+1,/^t21/-1sort/\d/rn
26 :/^t21:/+1,/^t22/-1sort/\d\d/
27 :/^t22:/+1,/^t23/-1sort/\d\d/n
28 :/^t23:/+1,/^t24/-1sort/\d\d/x
29 :/^t24:/+1,/^t25/-1sort/\d\d/r
30 :/^t25:/+1,/^t26/-1sort/\d\d/rn
31 :/^t26:/+1,/^t27/-1sort/\d\d/rx
32 :/^t27:/+1,/^t28/-1sort no
33 :/^t01:/,$wq! test.out
121 t06: numeric, reverse
172 t09: reverse, hexadecimal
189 t10: alpha, skip first character
206 t11: alpha, skip first 2 characters
223 t12: alpha, unique, skip first 2 characters
240 t13: numeric, skip first character
257 t14: alpha, sort on first character
274 t15: alpha, sort on first 2 characters
291 t16: numeric, sort on first character
308 t17: alpha, skip past first digit
325 t18: alpha, sort on first digit
342 t19: numeric, skip past first digit
359 t20: numeric, sort on first digit
376 t21: alpha, skip past first 2 digits
393 t22: numeric, skip past first 2 digits
410 t23: hexadecimal, skip past first 2 digits
427 t24: alpha, sort on first 2 digits
444 t25: numeric, sort on first 2 digits
461 t26: hexadecimal, sort on first 2 digits