86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
+
-
+
|
;;
;; test-a is waiting on test-b so we need to create a pattern for test-b given test-a and itemmap
(define (tests:extend-test-patts test-patt test-b test-a itemmap)
(let* ((patts (string-split test-patt ","))
(test-b-len (+ (string-length test-b) 1))
(patts-b (map (lambda (x)
(let* ((modpatt (if itemmap (db:convert-test-itempath x itemmap) x))
(newpatt (conc test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
(newpatt (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
;; (conc test-a "/," test-a "/" (substring modpatt test-b-len (string-length modpatt)))))
;; (print "in map, x=" x ", newpatt=" newpatt)
newpatt))
(filter (lambda (x)
(eq? (substring-index (conc test-b "/") x) 0))
patts))))
(string-intersperse (delete-duplicates (append patts (if (null? patts-b)
(list (conc test-a "/%"))
|