[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Regex PCRE tests failure under windows

From: Fabrice Popineau
Subject: Regex PCRE tests failure under windows
Date: Thu, 3 Aug 2017 12:28:59 +0200

I have this test failure on PCRE regex tests (emacs-master, mingw64) :

$ cat test/src/regex-tests.log
Running 22 tests (2017-08-01 22:21:34+0200)
   passed   1/22  regex-tests-BOOST
Test regex-tests-PCRE backtrace:
Test regex-tests-PCRE condition:
    (wrong-type-argument stringp nil)
   FAILED   2/22  regex-tests-PCRE

The failure occurs here in PCRE.tests :

    caterpillar caterpillar23
 0: caterpillar caterpillar23
 1: caterpillar
 2: erpillar
 3: <unset>
 5: 3

The variable which is nil instead of being a string is `pattern'
in (if (string-match pattern string) nil 'search-failed)`' :

(defun regex-tests-PCRE ()
  (let (failures
        pattern icase string what-failed matches-observed)
     ?# "PCRE.tests" regex-tests-PCRE-whitelist


      ;; pattern
      ((save-excursion (re-search-forward "^/\\(.*\\)/\\(.*i?\\)$" nil t))
       (setq icase (string= "i" (match-string 2))
             pattern (regex-tests-unextend (match-string 1))))

      ;; string. read it in, match against pattern, and save all the results
      ((save-excursion (re-search-forward "^    \\(.*\\)" nil t))
       (let ((case-fold-search icase))
         (setq string (match-string 1)

               ;; the regex match under test
               (condition-case nil
                   (if (string-match pattern string) nil 'search-failed)
                 ('invalid-regexp 'compilation-failed))

               (cl-loop for x from 0 to 20
                        collect (and (not what-failed)
                                     (or (match-string x string) "<unset>")))))

But I have no idea why pattern is losing its value ?

Any clue ?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]