Skip to content

Commit 58b953e

Browse files
Fixing Bug #79 with Suite Names in Test names (#83)
- Test names that started with the suite name no longer throw a module not found error.
1 parent 033d10b commit 58b953e

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
xquery version "1.0-ml";
2+
3+
import module namespace test = "http://marklogic.com/test" at "/test/test-controller.xqy",
4+
"/test/test-helper.xqy";
5+
6+
let $list := test:list()
7+
8+
return test:assert-exists($list/test:suite[@path="Assertions"]/test:tests/test:test[@path="assert-exists.xqy"])

marklogic-unit-test-modules/src/main/ml-modules/root/test/test-controller.xqy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ declare function list()
3737
for $uri in test:list-from-database($db-id, $root || "test/suites/")
3838
let $test-path := fn:replace($uri, fn:concat($root, "test/suites/?"), "")
3939
let $suite-path := cvt:basepath($test-path)
40-
let $test-name := fn:replace($test-path, $suite-path || "(\\|/)?", "")
40+
let $test-name := fn:replace($test-path, $suite-path || "(\\|/)", "")
4141

4242
let $suite-is-valid :=
4343
let $path-not-in-ignored-directory :=

0 commit comments

Comments
 (0)