git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH 0/3] Re: t4034: bulk verify builtin word regex sanity

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 11, 2011, 21:47 UTC
Message-ID
<20110111214707.GA29133@burratino>
In-Reply-To
<854c8b6fa8a368bb34cc22d3fc948ae7136ed177.1292688058.git.trast@student.ethz.ch>
Thomas Rast wrote:
> The builtin word regexes should be tested with some simple examples
> against simple issues, like failing to match a non-space character.
> Do this in bulk.

The above patch depends on "diff.c: implement a sanity check for word regexes" but not in any essential way. Patch 1 below is the part that is still relevant without it.

Patch 2 changes the UTF-8 catchall to match a single non-ASCII character[1], at the same time as making it harder to forget to use. (My motivation is that the UTF-8 catchall is missing in the new perl support.)

Patch 3 contains some cosmetic tweaks to the tests. They were meant as preparations for patch 2 but I checkened out and stopped there.

Thoughts and improvements welcome, as always.
Jonathan Nieder (2):
  userdiff: simplify word-diff safeguard
  t4034 (diff --word-diff): style suggestions
Thomas Rast (1):
  t4034: bulk verify builtin word regex sanity
 t/t4034-diff-words.sh  |  463 +++++++++++++++++++++++-------------------------
 t/t4034/bibtex/expect  |   15 ++
 t/t4034/bibtex/post    |   10 +
 t/t4034/bibtex/pre     |    9 +
 t/t4034/cpp/expect     |   36 ++++
 t/t4034/cpp/post       |   19 ++
 t/t4034/cpp/pre        |   19 ++
 t/t4034/csharp/expect  |   35 ++++
 t/t4034/csharp/post    |   18 ++
 t/t4034/csharp/pre     |   18 ++
 t/t4034/fortran/expect |   10 +
 t/t4034/fortran/post   |    5 +
 t/t4034/fortran/pre    |    5 +
 t/t4034/html/expect    |    8 +
 t/t4034/html/post      |    3 +
 t/t4034/html/pre       |    3 +
 t/t4034/java/expect    |   36 ++++
 t/t4034/java/post      |   19 ++
 t/t4034/java/pre       |   19 ++
 t/t4034/objc/expect    |   35 ++++
 t/t4034/objc/post      |   18 ++
 t/t4034/objc/pre       |   18 ++
 t/t4034/pascal/expect  |   35 ++++
 t/t4034/pascal/post    |   18 ++
 t/t4034/pascal/pre     |   18 ++
 t/t4034/php/expect     |   35 ++++
 t/t4034/php/post       |   18 ++
 t/t4034/php/pre        |   18 ++
 t/t4034/python/expect  |   34 ++++
 t/t4034/python/post    |   17 ++
 t/t4034/python/pre     |   17 ++
 t/t4034/ruby/expect    |   34 ++++
 t/t4034/ruby/post      |   17 ++
 t/t4034/ruby/pre       |   17 ++
 t/t4034/tex/expect     |    9 +
 t/t4034/tex/post       |    4 +
 t/t4034/tex/pre        |    4 +
 userdiff.c             |   37 ++---
 38 files changed, 887 insertions(+), 266 deletions(-)
 create mode 100644 t/t4034/bibtex/expect
 create mode 100644 t/t4034/bibtex/post
 create mode 100644 t/t4034/bibtex/pre
 create mode 100644 t/t4034/cpp/expect
 create mode 100644 t/t4034/cpp/post
 create mode 100644 t/t4034/cpp/pre
 create mode 100644 t/t4034/csharp/expect
 create mode 100644 t/t4034/csharp/post
 create mode 100644 t/t4034/csharp/pre
 create mode 100644 t/t4034/fortran/expect
 create mode 100644 t/t4034/fortran/post
 create mode 100644 t/t4034/fortran/pre
 create mode 100644 t/t4034/html/expect
 create mode 100644 t/t4034/html/post
 create mode 100644 t/t4034/html/pre
 create mode 100644 t/t4034/java/expect
 create mode 100644 t/t4034/java/post
 create mode 100644 t/t4034/java/pre
 create mode 100644 t/t4034/objc/expect
 create mode 100644 t/t4034/objc/post
 create mode 100644 t/t4034/objc/pre
 create mode 100644 t/t4034/pascal/expect
 create mode 100644 t/t4034/pascal/post
 create mode 100644 t/t4034/pascal/pre
 create mode 100644 t/t4034/php/expect
 create mode 100644 t/t4034/php/post
 create mode 100644 t/t4034/php/pre
 create mode 100644 t/t4034/python/expect
 create mode 100644 t/t4034/python/post
 create mode 100644 t/t4034/python/pre
 create mode 100644 t/t4034/ruby/expect
 create mode 100644 t/t4034/ruby/post
 create mode 100644 t/t4034/ruby/pre
 create mode 100644 t/t4034/tex/expect
 create mode 100644 t/t4034/tex/post
 create mode 100644 t/t4034/tex/pre

[1] suggested in <201012261206.11942.trast@student.ethz.ch>, which is missing from gmane for some reason.

Previous: Thomas RastNext: Jonathan Nieder
Message 17 of 23 in “--word-regex sanity checking and such”
  1. 0/4 --word-regex sanity checking and suchThomas Rast, Dec 15, 2010
  2. 1/4 diff.c: pass struct diff_words into find_word_boundariesThomas Rast, Dec 15, 2010
  3. 2/4 diff.c: implement a sanity check for word regexesThomas Rast, Dec 15, 2010
  4. 3/4 userdiff: fix typo in ruby word regexThomas Rast, Dec 15, 2010
  5. 4/4 t4034: bulk verify builtin word regex sanityThomas Rast, Dec 15, 2010
  6. Thomas RastDec 15, 2010
  7. Scott JohnsonDec 15, 2010
  8. 0/4 --word-regex sanity checking and suchThomas Rast, Dec 18, 2010
  9. 1/4 diff.c: pass struct diff_words into find_word_boundariesThomas Rast, Dec 18, 2010
  10. 2/4 diff.c: implement a sanity check for word regexesThomas Rast, Dec 18, 2010
  11. Junio C HamanoDec 18, 2010
  12. Thomas RastDec 19, 2010
  13. 3/4 userdiff: fix typo in ruby and python word regexesThomas Rast, Dec 18, 2010
  14. Junio C HamanoDec 18, 2010
  15. Thomas RastDec 19, 2010
  16. 4/4 t4034: bulk verify builtin word regex sanityThomas Rast, Dec 18, 2010
  17. 0/3 Re: t4034: bulk verify builtin word regex sanityJonathan Nieder, Jan 11, 2011
  18. 1/3 t4034: bulk verify builtin word regex sanityJonathan Nieder, Jan 11, 2011
  19. Re*: [PATCH 1/3] t4034: bulk verify builtin word regex sanityJunio C Hamano, Jan 18, 2011
  20. 2/3 userdiff: simplify word-diff safeguardJonathan Nieder, Jan 11, 2011
  21. 3/3 t4034 (diff --word-diff): style suggestionsJonathan Nieder, Jan 11, 2011
  22. Thomas RastDec 18, 2010
  23. Junio C HamanoDec 18, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.