Patch 7.4.1700
Problem: Equivalence classes are not properly tested.
Solution: Add tests for multi-byte and latin1. Fix an error. (Owen Leibman)
Files: src/regexp.c, src/testdir/Make_all.mak,
src/testdir/test_alot_latin.vim, src/testdir/test_alot_utf8.vim,
src/testdir/test_regexp_latin.vim,
src/testdir/test_regexp_utf8.vim
*** ../vim-7.4.1699/src/regexp.c 2016-02-23 14:52:31.893232088 +0100
--- src/regexp.c 2016-04-03 13:52:44.360904094 +0200
***************
*** 791,797 ****
"E\x71\x72\x73\x74",
"I\x75\x76\x77\x78",
"N\x69",
! "O\xEB\xEC\xED\xEE\xEF",
"U\xFB\xFC\xFD\xFE",
"Y\xBA",
"a\x42\x43\x44\x45\x46\x47",
--- 791,797 ----
"E\x71\x72\x73\x74",
"I\x75\x76\x77\x78",
"N\x69",
! "O\xEB\xEC\xED\xEE\xEF\x80",
"U\xFB\xFC\xFD\xFE",
"Y\xBA",
"a\x42\x43\x44\x45\x46\x47",
***************
*** 799,805 ****
"e\x51\x52\x53\x54",
"i\x55\x56\x57\x58",
"n\x49",
! "o\xCB\xCC\xCD\xCE\xCF",
"u\xDB\xDC\xDD\xDE",
"y\x8D\xDF",
};
--- 799,805 ----
"e\x51\x52\x53\x54",
"i\x55\x56\x57\x58",
"n\x49",
! "o\xCB\xCC\xCD\xCE\xCF\x70",
"u\xDB\xDC\xDD\xDE",
"y\x8D\xDF",
};
*** ../vim-7.4.1699/src/testdir/Make_all.mak 2016-03-25 17:55:24.966112156
+0100
--- src/testdir/Make_all.mak 2016-04-03 13:39:53.692781525 +0200
***************
*** 183,188 ****
--- 183,190 ----
test_viml.res \
test_visual.res \
test_window_id.res \
+ test_alot_latin.res \
+ test_alot_utf8.res \
test_alot.res
*** ../vim-7.4.1699/src/testdir/test_alot_latin.vim 2016-04-03
13:58:57.077093588 +0200
--- src/testdir/test_alot_latin.vim 2016-04-03 13:37:37.990169509 +0200
***************
*** 0 ****
--- 1,7 ----
+ " A series of tests that can run in one Vim invocation.
+ " This makes testing go faster, since Vim doesn't need to restart.
+
+ " These tests use latin1 'encoding'. Setting 'encoding' is in the individual
+ " files, so that they can be run by themselves.
+
+ source test_regexp_latin.vim
*** ../vim-7.4.1699/src/testdir/test_alot_utf8.vim 2016-04-03
13:58:57.081093547 +0200
--- src/testdir/test_alot_utf8.vim 2016-04-03 13:40:28.064430068 +0200
***************
*** 0 ****
--- 1,7 ----
+ " A series of tests that can run in one Vim invocation.
+ " This makes testing go faster, since Vim doesn't need to restart.
+
+ " These tests use utf8 'encoding'. Setting 'encoding' is in the individual
+ " files, so that they can be run by themselves.
+
+ source test_regexp_utf8.vim
*** ../vim-7.4.1699/src/testdir/test_regexp_latin.vim 2016-04-03
13:58:57.085093505 +0200
--- src/testdir/test_regexp_latin.vim 2016-04-03 13:36:04.471126184 +0200
***************
*** 0 ****
--- 1,32 ----
+ " Tests for regexp in latin1 encoding
+ set encoding=latin1
+ scriptencoding latin1
+
+ func s:equivalence_test()
+ let str = "AÀÁÂÃÄÅ B C D EÈÉÊË F G H IÌÍÎÏ J K L M NÑ OÒÓÔÕÖØ P Q R S T
UÙÚÛÜ V W X YÝ Z aàáâãäå b c d eèéêë f g h iìíîï j k l m nñ oòóôõöø p q r s t
uùúûü v w x yýÿ z"
+ let groups = split(str)
+ for group1 in groups
+ for c in split(group1, '\zs')
+ " next statement confirms that equivalence class matches every
+ " character in group
+ call assert_match('^[[=' . c . '=]]*$', group1)
+ for group2 in groups
+ if group2 != group1
+ " next statement converts that equivalence class doesn't match
+ " a character in any other group
+ call assert_equal(-1, match(group2, '[[=' . c . '=]]'))
+ endif
+ endfor
+ endfor
+ endfor
+ endfunc
+
+ func Test_equivalence_re1()
+ set re=1
+ call s:equivalence_test()
+ endfunc
+
+ func Test_equivalence_re2()
+ set re=2
+ call s:equivalence_test()
+ endfunc
*** ../vim-7.4.1699/src/testdir/test_regexp_utf8.vim 2016-04-03
13:58:57.089093466 +0200
--- src/testdir/test_regexp_utf8.vim 2016-04-03 13:42:41.435066436 +0200
***************
*** 0 ****
--- 1,35 ----
+ " Tests for regexp in utf8 encoding
+ if !has('multi_byte')
+ finish
+ endif
+ set encoding=utf-8
+ scriptencoding utf-8
+
+ func s:equivalence_test()
+ let str = "AÃ€Ã Ã‚ÃƒÃ„Ã…Ä€Ä‚Ä„Ç ÇžÇ áº¢ BḂḆ CÇĆĈĊČ DÄŽÄ á¸Šá¸Žá¸
EÈÉÊËĒĔĖĘĚẺẼ FḞ GÄœÄžÄ Ä¢Ç¤Ç¦Ç´á¸ HĤĦḢḦḨ IÌà ÎÃ
Ä¨ÄªÄ¬Ä®Ä°Ç á»ˆ JÄ´ KĶǨḰḴ LĹĻĽĿŠḺ MḾṀ NÑŃŅŇṄṈ
OÃ’Ã“Ã”Ã•Ã–Ã˜ÅŒÅŽÅ Æ Ç‘ÇªÇ¬á»Ž PṔṖ Q RŔŖŘṘṞ SŚŜŞŠá¹
TŢŤŦṪṮ UÙÚÛÜŨŪŬŮŰŲƯǓỦ Vá¹¼ WŴẀẂẄẆ XẊẌ YÃ
ŶŸẎỲỶỸ ZŹŻŽƵẠẔ aÃ Ã¡Ã¢Ã£Ã¤Ã¥Ä ÄƒÄ…ÇŽÇŸÇ¡áº£ bḃḇ
cÃ§Ä‡Ä‰Ä‹Ä dÄ Ä‘á¸‹á¸ á¸‘ eèéêëēĕėęěẻẽ fḟ gÄ ÄŸÄ¡Ä£Ç¥Ç§Çµá¸¡
hĥħḣḧḩẖ iìÃîïĩīÄÄ¯Ç á»‰ jĵǰ kķǩḱḵ lĺļľŀłḻ
mḿṠnñńņňʼnṅṉ oòóôõöøŠŠőơǒǫÇá» pṕṗ q
rŕŗřṙṟ sśŠşšṡ tţťŧṫṯẗ uùúûüũūÅůűųưǔủ vá¹½
wŵẠẃẅẇẘ xẋẠyýÿŷẠẙỳỷỹ zźżžƶẑẕ"
+ let groups = split(str)
+ for group1 in groups
+ for c in split(group1, '\zs')
+ " next statement confirms that equivalence class matches every
+ " character in group
+ call assert_match('^[[=' . c . '=]]*$', group1)
+ for group2 in groups
+ if group2 != group1
+ " next statement converts that equivalence class doesn't match
+ " character in any other group
+ call assert_equal(-1, match(group2, '[[=' . c . '=]]'))
+ endif
+ endfor
+ endfor
+ endfor
+ endfunc
+
+ func Test_equivalence_re1()
+ set re=1
+ call s:equivalence_test()
+ endfunc
+
+ func Test_equivalence_re2()
+ set re=2
+ call s:equivalence_test()
+ endfunc
*** ../vim-7.4.1699/src/version.c 2016-04-02 22:44:12.448146599 +0200
--- src/version.c 2016-04-03 13:59:09.892962338 +0200
***************
*** 750,751 ****
--- 750,753 ----
{ /* Add new patch number below this line */
+ /**/
+ 1700,
/**/
--
hundred-and-one symptoms of being an internet addict:
204. You're being audited because you mailed your tax return to the IRC.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.