Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ class SidebarParserTest:
| - page: my-page6/my-page6/my-page6.md
""".stripMargin

private val sidebarNoTitle =
private val sidebarErrorNoTitle =
"""index: index.md
|subsection:
| - title: My title
| page: my-page1.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change makes the YAML invalid, I think there should be a - before page.

Also, I am surprised that the regression occurred only on Windows. Do you know why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the goal. This sidebar is, after that, asserted to have an error when used, with loadSidebarNoTitleError().

| - page: my-page2.md
| - page: my-page3/subsection
Expand Down Expand Up @@ -122,7 +121,6 @@ class SidebarParserTest:
Console.withErr(new PrintStream(out)) {
Sidebar.load(sidebarErrorNoPage)(using testContext)
}
println(out.toString())
val error = out.toString().trim()

assert(error.contains(msgNoPage) && error.contains(schemaMessage))
Expand All @@ -132,7 +130,7 @@ class SidebarParserTest:
def loadSidebarNoTitleError(): Unit =
val out = new ByteArrayOutputStream()
Console.withErr(new PrintStream(out)) {
Sidebar.load(sidebarNoTitle)(using testContext)
Sidebar.load(sidebarErrorNoTitle)(using testContext)
}
val error = out.toString().trim()

Expand Down