Megatest

Diff
Login

Differences From Artifact [e7a7ac51ef]:

To Artifact [f5126ccab5]:


67
68
69
70
71
72
73

74
75
76
77
78
79
80
81
82
83
84
85
86
   (else #f)))

(define (any->number-if-possible val)
  (let ((num (any->number val)))
    (if num num val)))

(define (patt-list-match item patts)

  (if (and item patts)  ;; here we are filtering for matches with -itempatt
      (let ((res #f))   ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is %
	(for-each 
	 (lambda (patt)
	   (if (string-match 
		(regexp (string-substitute "%" ".*" "a%b")) ;;(glob->regexp (string-translate patt "%" "*"))
		item)
	       (set! res #t)))
	 (string-split patts ","))
	res)
      #t))

;;======================================================================







>





|







67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
   (else #f)))

(define (any->number-if-possible val)
  (let ((num (any->number val)))
    (if num num val)))

(define (patt-list-match item patts)
  (debug:print 8 "INFO: patt-list-match item=" item " patts=" patts)
  (if (and item patts)  ;; here we are filtering for matches with -itempatt
      (let ((res #f))   ;; look through all the item-patts if defined, format is patt1,patt2,patt3 ... wildcard is %
	(for-each 
	 (lambda (patt)
	   (if (string-match 
		(regexp (string-substitute "%" ".*" patt)) ;;(glob->regexp (string-translate patt "%" "*"))
		item)
	       (set! res #t)))
	 (string-split patts ","))
	res)
      #t))

;;======================================================================