Skip to content

Commit bf7b978

Browse files
authored
Merge pull request #310 from w3c/fxl-roll-rearrange
Rearranging tests with fxl terminology change + roll layout
2 parents ca2b6b5 + 7b137e8 commit bf7b978

File tree

348 files changed

+6665
-2221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

348 files changed

+6665
-2221
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ tests/.DS_Store
3636
.vscode/
3737

3838
tests/*.epub
39+
check
40+
3941

4042

4143
check

generate/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"Internationalization",
3535
"Content Documents",
3636
"Navigation Documents",
37-
"Fixed Layout",
37+
"Pre-paginated Layout",
38+
"Roll Layout",
3839
"Open Container Format",
3940
"Scripting",
4041
"Media Overlays",

generate/fragments/complete_results.html

Lines changed: 259 additions & 644 deletions
Large diffs are not rendered by default.

generate/fragments/consolidated_results.html

Lines changed: 201 additions & 388 deletions
Large diffs are not rendered by default.

generate/fragments/creators.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<li>Marisa DeMeglio</li>
77
<li>Matt Garrish</li>
88
<li>Matthew Chan</li>
9+
<li>Susan Neuhaus</li>
910
<li>Wendy Reid</li>
1011
<li>Zheng Xu</li>
1112
</ul>

generate/fragments/tests.html

Lines changed: 214 additions & 214 deletions
Large diffs are not rendered by default.

generate/src/create_report.ts

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { getTestData, getReportData, getTemplate } fr
3636
import { createReport } from "./lib/html.ts";
3737
import { applyConfigurationOptions } from './lib/config.ts';
3838
import { type OPDS, createOPDS } from './lib/opds.ts';
39+
import { Command } from 'commander';
3940

4041

4142
/**
@@ -52,6 +53,18 @@ async function adjust_date(fname: string): Promise<void> {
5253
* Main entry point: generate the reports' html fragment files (i.e., the real "meat" for the data) and a template file
5354
*/
5455
async function main() {
56+
const program = new Command();
57+
program
58+
.name('generate')
59+
.description('Generation of the EPUB 3 test descriptions and test results')
60+
.usage('[options')
61+
.option('-d --debug', 'run the script on the debug test suite')
62+
.option('-f --full', 'run in full mode, ie, include the deprecated tests in the output')
63+
.parse(["", "", ...Deno.args]);
64+
const options = program.opts();
65+
const debug = options.debug ?? false;
66+
const full = options.full ?? false;
67+
5568
// Get the final data for files and directories, depending on the debug flag
5669
const [
5770
TESTS_DIR,
@@ -65,10 +78,10 @@ async function main() {
6578
OPDS,
6679
DOC_TEST_RESULTS,
6780
DOC_TEST_DESCRIPTIONS
68-
] = Constants.final_constants((Deno.args.length > 0 && Deno.args[0] === '-d'));
81+
] = Constants.final_constants(debug);
6982

7083
const test_data: TestData[] = await getTestData(TESTS_DIR);
71-
const report_data: ReportData = await getReportData(test_data, TEST_RESULTS_DIR);
84+
const report_data: ReportData = await getReportData(test_data, TEST_RESULTS_DIR, full);
7285
const template: Raw_ImplementationReport = getTemplate(report_data);
7386

7487
const final_report_data: ReportData = applyConfigurationOptions(report_data);

generate/src/deno.jsonc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "Generation of index and resolutions' files for EPUB tests and test results.",
33
// Version 1.1.0 adds the concept and management of deprecated tests
4-
"version": "1.1.0.",
4+
"version": "1.1.1.",
55
"compilerOptions": {
66
"lib": ["dom", "dom.iterable", "dom.asynciterable", "esnext", "deno.ns"]
77
},
@@ -22,13 +22,21 @@
2222
},
2323
"tasks": {
2424
"generate": {
25-
"description": "This is the command ran via a github action: run all the report generation.",
25+
"description": "This is the command ran via a github action: run all the report generation. Deprecated tests are ignored.",
2626
"command": "deno run -A create_report.ts"
2727
},
28+
"generate-full": {
29+
"description": "This is the command ran via a github action: run all the report generation. Deprecated tests are included.",
30+
"command": "deno run -A create_report.ts -f"
31+
},
2832
"debug-generate": {
29-
"description": "Run the generation script, but on the 'debug/tests' folder; saves running the script on the full test suite.",
33+
"description": "Run the generation script, but on the 'debug/tests' folder; saves running the script on the full test suite. Deprecated tests are ignored",
3034
"command": "deno run -A create_report.ts -d"
3135
},
36+
"debug-generate-full": {
37+
"description": "Run the generation script, but on the 'debug/tests' folder; saves running the script on the full test suite. Deprecated tests are included.",
38+
"command": "deno run -A create_report.ts -df"
39+
},
3240
"manage": {
3341
"description": "This is the command ran via a github action: create all the epub files.",
3442
"command": "deno run -A manage_tests.ts"

generate/src/lib/data.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ export async function getTestData(dir_name: string): Promise<TestData[]> {
466466
* @param test_data all the metadata for all tests
467467
* @param reports directory where the implementation reports reside
468468
*/
469-
export async function getReportData(test_data: TestData[], reports: string): Promise<ReportData> {
469+
export async function getReportData(test_data: TestData[], reports: string, full: boolean): Promise<ReportData> {
470470
const sort_test_data = (all_tests: TestData[]): TestData[] => {
471471
const required_tests: TestData[] = [];
472472
const optional_tests: TestData[] = [];
@@ -483,7 +483,9 @@ export async function getReportData(test_data: TestData[], reports: string): Pro
483483
}
484484

485485
for (const test of all_tests) {
486-
get_array(test.required).push(test);
486+
// unless explicitly required in the command line, deprecated tests are ignored
487+
if (!(test.required === ReqType.deprecated && full === false))
488+
get_array(test.required).push(test);
487489
}
488490

489491
// This is, most of the times, unnecessary, because the directory reading has an alphabetic order already.

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
}
120120

121121
tr.deprecated td:nth-child(2)::after {
122-
content: " (Feature is deprecated.)"
122+
content: " (Test is deprecated.)"
123123

124124
}
125125

@@ -134,7 +134,7 @@
134134
latestVersion: "https://w3c.github.io/epub-tests/",
135135
specStatus: "base",
136136
noRecTrack: true,
137-
publishDate: "2025-11-21",
137+
publishDate: "2026-01-14",
138138
shortName: "epub-tests",
139139
edDraftURI: "https://w3c.github.io/epub-tests/",
140140
copyrightStart: "2021",

0 commit comments

Comments
 (0)