diff --git a/test262/per-file/main.js b/test262/per-file/main.js index 02f3d76..db46180 100644 --- a/test262/per-file/main.js +++ b/test262/per-file/main.js @@ -238,7 +238,7 @@ function generateChildNode(childName, child, filepath) { child.aggregatedResults ); childNode.querySelector(".tree-node-github-url").href = - window.config.generateGitHubURLFromTestPath(filepath); + window.config.generateGitHubURLFromTestPath(filepath, childName); return childNode; } diff --git a/wasm/per-file/index.html b/wasm/per-file/index.html index 7ad561a..2222b8c 100644 --- a/wasm/per-file/index.html +++ b/wasm/per-file/index.html @@ -60,10 +60,12 @@

Per-file results

window.config = { initialPathInTree: "Spec", loadPathsAndModes: [["wasm/per-file-master.json", "Default"]], - generateGitHubURLFromTestPath(filepath) { + generateGitHubURLFromTestPath(filepath, testName) { const result = /^Spec\/(.*)\.js\/[^:]*::(.*)*$/.exec(filepath); if (!result) return ""; - return `https://github.com/WebAssembly/testsuite/blob/main/${result[1]}.wast`; + const lineNumber = /\(line (\d+)\)$/.exec(testName); + const line = lineNumber ? `#L${lineNumber[1]}` : ""; + return `https://github.com/WebAssembly/testsuite/blob/main/${result[1]}.wast${line}`; }, };