@@ -4326,33 +4326,45 @@ testVim('ex_sort_decimal_mixed_reverse', function(cm, vim, helpers) {
43264326 eq ( 'a3\nb2\nc1\nz\ny' , cm . getValue ( ) ) ;
43274327} , { value : 'a3\nz\nc1\ny\nb2' } ) ;
43284328testVim ( 'ex_sort_pattern_alpha' , function ( cm , vim , helpers ) {
4329- helpers . doEx ( 'sort /[a-z]/' ) ;
4329+ helpers . doEx ( 'sort r /[a-z]/' ) ;
43304330 eq ( 'a3\nb2\nc1\ny\nz' , cm . getValue ( ) ) ;
43314331} , { value : 'z\ny\nc1\nb2\na3' } ) ;
43324332testVim ( 'ex_sort_pattern_alpha_reverse' , function ( cm , vim , helpers ) {
4333- helpers . doEx ( 'sort! /[a-z]/' ) ;
4333+ helpers . doEx ( 'sort! r /[a-z]/' ) ;
43344334 eq ( 'z\ny\nc1\nb2\na3' , cm . getValue ( ) ) ;
43354335} , { value : 'z\ny\nc1\nb2\na3' } ) ;
43364336testVim ( 'ex_sort_pattern_alpha_ignoreCase' , function ( cm , vim , helpers ) {
4337- helpers . doEx ( 'sort i /[a-z]/' ) ;
4337+ helpers . doEx ( 'sort ri /[a-z]/' ) ;
43384338 eq ( 'a3\nb2\nC1\nY\nz' , cm . getValue ( ) ) ;
43394339} , { value : 'z\nY\nC1\nb2\na3' } ) ;
43404340testVim ( 'ex_sort_pattern_alpha_longer' , function ( cm , vim , helpers ) {
4341- helpers . doEx ( 'sort /[a-z]+/' ) ;
4341+ helpers . doEx ( 'sort r /[a-z]+/' ) ;
43424342 eq ( 'a\naa\nab\nade\nadele\nadelle\nadriana\nalex\nalexandra\nb\nc\ny\nz' , cm . getValue ( ) ) ;
43434343} , { value : 'z\nab\naa\nade\nadelle\nalexandra\nalex\nadriana\nadele\ny\nc\nb\na' } ) ;
43444344testVim ( 'ex_sort_pattern_alpha_only' , function ( cm , vim , helpers ) {
4345- helpers . doEx ( 'sort /^[a-z]$/' ) ;
4345+ helpers . doEx ( 'sort r /^[a-z]$/' ) ;
43464346 eq ( 'z1\ny2\na3\nb\nc' , cm . getValue ( ) ) ;
43474347} , { value : 'z1\ny2\na3\nc\nb' } ) ;
43484348testVim ( 'ex_sort_pattern_alpha_only_reverse' , function ( cm , vim , helpers ) {
4349- helpers . doEx ( 'sort! /^[a-z]$/' ) ;
4349+ helpers . doEx ( 'sort! r /^[a-z]$/' ) ;
43504350 eq ( 'c\nb\nz1\ny2\na3' , cm . getValue ( ) ) ;
43514351} , { value : 'z1\ny2\na3\nc\nb' } ) ;
43524352testVim ( 'ex_sort_pattern_alpha_num' , function ( cm , vim , helpers ) {
4353- helpers . doEx ( 'sort /[a-z][0-9]/' ) ;
4353+ helpers . doEx ( 'sort r /[a-z][0-9]/' ) ;
43544354 eq ( 'c\nb\na3\ny2\nz1' , cm . getValue ( ) ) ;
43554355} , { value : 'z1\ny2\na3\nc\nb' } ) ;
4356+ testVim ( 'ex_sort_pattern_no_r' , function ( cm , vim , helpers ) {
4357+ helpers . doEx ( 'sort /in/' ) ;
4358+ eq ( ' z \n in\n\n3 in a \n1 in c \n2 in d ' , cm . getValue ( ) ) ;
4359+ helpers . doEx ( 'sort r/in/' ) ;
4360+ eq ( ' z \n\n in\n3 in a \n1 in c \n2 in d ' , cm . getValue ( ) ) ;
4361+ helpers . doEx ( 'sort r/. in/' ) ;
4362+ eq ( ' z \n\n in\n1 in c \n2 in d \n3 in a ' , cm . getValue ( ) ) ;
4363+ helpers . doEx ( 'sort /./' ) ;
4364+ eq ( '\n3 in a \n1 in c \n2 in d \n in\n z ' , cm . getValue ( ) ) ;
4365+ helpers . doEx ( 'sort /in d/' ) ;
4366+ eq ( '\n3 in a \n1 in c \n in\n z \n2 in d ' , cm . getValue ( ) ) ;
4367+ } , { value : '1 in c \n z \n2 in d \n in\n3 in a \n' } ) ;
43564368// test for :global command
43574369testVim ( 'ex_global' , function ( cm , vim , helpers ) {
43584370 cm . setCursor ( 0 , 0 ) ;
0 commit comments