tests/testthat/test-examples-spans.R

# Generated by helper-tests.R, do not edit by hand


test_that("examples/quarto-cli/dev-docs/feature-format-matrix/index.qmd", {
  # Line 26
  testthat::expect_true(
    length(parse_spans_cpp("| [🚫]{.bad}|  A bug |")) >= 1
  )
  # Line 27
  testthat::expect_true(
    length(parse_spans_cpp("| [⚠]{.ok}|  Needs improvement |")) >= 1
  )
  # Line 28
  testthat::expect_true(
    length(parse_spans_cpp("| [✓]{.good}|  Good |")) >= 1
  )
  # Line 29
  testthat::expect_true(
    length(parse_spans_cpp("| [✓✓]{.good}|  Good, with tests |")) >= 1
  )
  # Line 30
  testthat::expect_true(
    length(parse_spans_cpp("| [💬]{.unknown} |  A comment |")) >= 1
  )
})

test_that("examples/quarto-cli/dev-docs/feature-format-matrix/qmd-files/css-properties/background-color/span-background-color-mediumseagreen.qmd", {
  # Line 26
  testthat::expect_true(
    length(parse_spans_cpp("This is some [text with a green background]{style=\"background-color:mediumseagreen\"}.")) >= 1
  )
})

test_that("examples/quarto-cli/dev-docs/feature-format-matrix/qmd-files/css-properties/opacity/opacity-span.qmd", {
  # Line 25
  testthat::expect_true(
    length(parse_spans_cpp("This text [is progressively]{style=\"opacity: 50%\"} [dis]{style=\"opacity: 40%\"}[appe]{style=\"opacity: 30%\"}[ar]{style=\"opacity: 20%\"}[in]{style=\"opacity: 10%\"}[g.]{style=\"opacity: 0%\"}")) >= 1
  )
  # Line 27
  testthat::expect_true(
    length(parse_spans_cpp("Note [that there is [no opacity *filter* in Typst, [so we just apply it to the alpha of the text color. [So nesting [opacities do not [accumulate in Typst.]{style=\"opacity: 50%\"}]{style=\"opacity: 50%\"}]{style=\"opacity: 50%\"}]{style=\"opacity: 50%\"}]{style=\"opacity: 50%\"}]{style=\"opacity: 50%\"}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/extensions/basic/format.qmd", {
  # Line 29
  testthat::expect_true(
    length(parse_spans_cpp("  For outlining the typical structure of a JSS article some brief text snippets are employed that have been inspired by @ZeileisKleiberJackman2008, discussing count data regression in [R]{.proglang}. Editorial comments and instructions are marked by vertical bars.")) >= 1
  )
  # Line 32
  testthat::expect_true(
    length(parse_spans_cpp("keywords-formatted: [JSS, style guide, comma-separated, not capitalized, \"[R]{.proglang}\"]")) >= 1
  )
  # Line 49
  testthat::expect_true(
    length(parse_spans_cpp("In [R]{.proglang} @R, GLMs are provided by the model fitting functions [glm]{.fct} in the [stats]{.pkg} package and [glm.nb]{.fct} in the [MASS]{.pkg} package [@VenablesRipley2002] along with associated methods for diagnostics and inference. The manuscript that this document is based on [@ZeileisKleiberJackman2008] then introduced hurdle and zero-inflated count models in the functions [hurdle]{.fct} and [zeroinfl]{.fct} in the [pcsl]{.pkg} package @Jackman2015. Of course, much more software could be discussed here, including (but not limited to) generalized additive models for count data as available in the [R]{.proglang} packages [mgcv]{.pkg} @Wood2006, [gamlss]{.pkg} @StasinopoulosRigby2007, or [VGAM]{.pkg} @Yee2009.")) >= 1
  )
  # Line 65
  testthat::expect_true(
    length(parse_spans_cpp("[R]{.proglang} provides a very flexible implementation of the general GLM framework in the function [glm]{.fct} @ChambersHastie1992 in the [stats]{.pkg} package. Its most important arguments are")) >= 1
  )
  # Line 73
  testthat::expect_true(
    length(parse_spans_cpp("where `formula` plus `data` is the now standard way of specifying regression relationships in [R]{.proglang}/[S]{.proglang} introduced in @ChambersHastie1992. The remaining arguments in the first line (`subset`, `na.action`, `weights`, and `offset`) are also standard for setting up formula-based regression models in [R]{.proglang}/[S]{.proglang}. The arguments in the second line control aspects specific to GLMs while the arguments in the last line specify which components are returned in the fitted model object (of class [glm]{.class} which inherits from [lm]{.class}). For further arguments to [glm]{.fct} (including alternative specifications of starting values) see `?glm`. For estimating a Poisson model `family = poisson` has to be specified.")) >= 1
  )
  # Line 94
  testthat::expect_true(
    length(parse_spans_cpp("`quine` data from the [MASS]{.pkg} package is used. This provides the number")) >= 1
  )
  # Line 109
  testthat::expect_true(
    length(parse_spans_cpp("produced by [Sweave]{.fct} or [knitr]{.pkg} when using the `render_sweave()`")) >= 1
  )
  # Line 112
  testthat::expect_true(
    length(parse_spans_cpp("[R]{.proglang} code, the prompt `R> ` should be used with `+  ` as")) >= 1
  )
  # Line 176
  testthat::expect_true(
    length(parse_spans_cpp("The results in this paper were obtained using [R]{.proglang}~3.4.1 with the")) >= 1
  )
  # Line 177
  testthat::expect_true(
    length(parse_spans_cpp("[MASS]{.pkg}~7.3.47 package. [R]{.proglang} itself and all packages used are available from the Comprehensive [R]{.proglang} Archive Network (CRAN) at")) >= 1
  )
  # Line 216
  testthat::expect_true(
    length(parse_spans_cpp("- Turning JSS manuscripts into [R]{.proglang} package vignettes.")) >= 1
  )
  # Line 240
  testthat::expect_true(
    length(parse_spans_cpp("- item Software should be properly cited as well. For [R]{.proglang} packages `citation(\"pkgname\")` typically provides a good starting point.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/page-layout/tufte-html.qmd", {
  # Line 126
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class `column-margin` which places it in the margin without the sidenote mark.]{.column-margin} If you'd like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use apply the `column-margin` class to the element.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/page-layout/tufte-pdf.qmd", {
  # Line 126
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class `column-margin` which places it in the margin without the sidenote mark.]{.column-margin} If you'd like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use apply the `column-margin` class to the element.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/search/issue-10285/search-test-3.qmd", {
  # Line 6
  testthat::expect_true(
    length(parse_spans_cpp("[Please find me.]{.quarto-include-in-search-index}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2023/01/26/4068.qmd", {
  # Line 18
  testthat::expect_true(
    length(parse_spans_cpp("[ContentSubTabA]{#subtabA-content}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2023/04/01/5060.qmd", {
  # Line 50
  testthat::expect_true(
    length(parse_spans_cpp("1.  [*Memorizing*]{.underline} (sequentielle Logik)")) >= 1
  )
  # Line 51
  testthat::expect_true(
    length(parse_spans_cpp("2.  [*Memoryless*]{.underline} (kombinatorische Logik)")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2023/05/16/5534.qmd", {
  # Line 10
  testthat::expect_true(
    length(parse_spans_cpp("foo: \"[yeah]{.foo}\"")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2023/10/04/content-hidden.qmd", {
  # Line 19
  testthat::expect_true(
    length(parse_spans_cpp("[[Hi!]{.be-here}]{.content-visible when-format=\"html\"}")) >= 1
  )
  # Line 21
  testthat::expect_true(
    length(parse_spans_cpp("[[Hi!]{.do-not-be-here}]{.content-hidden when-format=\"html\"}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2023/11/06/7466.qmd", {
  # Line 17
  testthat::expect_true(
    length(parse_spans_cpp("[Will only appear in HTML and not in Reveal.js]{#only-html}")) >= 1
  )
  # Line 23
  testthat::expect_true(
    length(parse_spans_cpp("[Will only appear in Reveal.js and not in HTML or other formats.]{#only-revealjs}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2024/05/06/9593.qmd", {
  # Line 16
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class `column-margin` which places it in the margin without the sidenote mark.]{.column-margin} If you'd like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use apply the `column-margin` class to the element.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2024/06/06/9903.qmd", {
  # Line 22
  testthat::expect_true(
    length(parse_spans_cpp("[A span]{#foo attr='{{< meta htmllink >}}'}.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2024/06/07/9903-2.qmd", {
  # Line 12
  testthat::expect_true(
    length(parse_spans_cpp("[A span]{#span-1 key='{{< meta htmllink >}}'}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/2024/06/20/10018.qmd", {
  # Line 14
  testthat::expect_true(
    length(parse_spans_cpp("I'm confused... [why isn't this aside working?]{.aside}")) >= 1
  )
  # Line 22
  testthat::expect_true(
    length(parse_spans_cpp("[This aside doesn't.]{.aside}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/article-layout/tables/tufte.qmd", {
  # Line 147
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class `column-margin` which places it in the margin without the sidenote mark.]{.column-margin} If you'd like to place ancillary information in the margin without the sidenote mark (the superscript number), you can use apply the `column-margin` class to the element.")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/brand/test-01/index.qmd", {
  # Line 15
  testthat::expect_true(
    length(parse_spans_cpp("[a span]{style='color: {{< brand color primary >}}'}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/conditional-content/meta.qmd", {
  # Line 22
  testthat::expect_true(
    length(parse_spans_cpp("[stuff]{#MustBeHere}")) >= 1
  )
  # Line 28
  testthat::expect_true(
    length(parse_spans_cpp("[other stuff]{#MustBeHereToo}")) >= 1
  )
  # Line 36
  testthat::expect_true(
    length(parse_spans_cpp("[other stuff]{#CannotBeHereEither}")) >= 1
  )
  # Line 46
  testthat::expect_true(
    length(parse_spans_cpp("[stuff]{#MustBeHereFalse}")) >= 1
  )
  # Line 52
  testthat::expect_true(
    length(parse_spans_cpp("[other stuff]{#MustBeHereTooFalse}")) >= 1
  )
  # Line 60
  testthat::expect_true(
    length(parse_spans_cpp("[other stuff]{#CannotBeHereEitherFalse}")) >= 1
  )
  # Line 69
  testthat::expect_true(
    length(parse_spans_cpp("[other stuff]{#CannotBeHere}")) >= 1
  )
})

test_that("examples/quarto-cli/tests/docs/smoke-all/confluence/confluence-smoke-test.qmd", {
  # Line 203
  testthat::expect_true(
    length(parse_spans_cpp("    [This is *some orange text*]{style=\"color:orange\"}")) >= 1
  )
  # Line 205
  testthat::expect_true(
    length(parse_spans_cpp("[This is *some orange text*]{style=\"color:orange\"}")) >= 1
  )
  # Line 461
  testthat::expect_true(
    length(parse_spans_cpp("[Not Yet Supported]{style=\"color:orange\"}")) >= 1
  )
  # Line 521
  testthat::expect_true(
    length(parse_spans_cpp("[Not Yet Supported]{style=\"color:orange\"}")) >= 1
  )
})

test_that("examples/quarto-web/docs/authoring/article-layout.qmd", {
  # Line 250
  testthat::expect_true(
    length(parse_spans_cpp("Asides allow you to place content aside from the content it is placed in. Asides look like footnotes, but do not include the footnote mark (the superscript number). [This is a span that has the class `aside` which places it in the margin without a footnote number.]{.aside}")) >= 1
  )
  # Line 253
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class `aside` which places it in the margin without a footnote number.]{.aside}")) >= 1
  )
})

test_that("examples/quarto-web/docs/authoring/conditional.qmd", {
  # Line 32
  testthat::expect_true(
    length(parse_spans_cpp("[in HTML.]{.content-visible when-format=\"html\"}")) >= 1
  )
  # Line 33
  testthat::expect_true(
    length(parse_spans_cpp("[in PDF.]{.content-visible when-format=\"pdf\"}")) >= 1
  )
})

test_that("examples/quarto-web/docs/authoring/contents.qmd", {
  # Line 97
  testthat::expect_true(
    length(parse_spans_cpp("We will define some values here. [`{python} \"some code\"`]{#a-span}")) >= 1
  )
})

test_that("examples/quarto-web/docs/authoring/markdown-basics.qmd", {
  # Line 465
  testthat::expect_true(
    length(parse_spans_cpp("[This is *some text*]{.class key=\"val\"}")) >= 1
  )
  # Line 481
  testthat::expect_true(
    length(parse_spans_cpp("[This is good]{#id .class key1=\"val1\" key2=\"val2\"}")) >= 1
  )
  # Line 541
  testthat::expect_true(
    length(parse_spans_cpp("| ``` markdown                           | [This text is smallcaps]{.smallcaps}      |")) >= 1
  )
  # Line 542
  testthat::expect_true(
    length(parse_spans_cpp("| [This text is smallcaps]{.smallcaps}   |                                           |")) >= 1
  )
  # Line 545
  testthat::expect_true(
    length(parse_spans_cpp("| ``` markdown                           | [This text is underlined]{.underline}     |")) >= 1
  )
  # Line 546
  testthat::expect_true(
    length(parse_spans_cpp("| [This text is underlined]{.underline}  |                                           |")) >= 1
  )
  # Line 549
  testthat::expect_true(
    length(parse_spans_cpp("| ``` markdown                           | [This text is highlighted]{.mark}         |")) >= 1
  )
  # Line 550
  testthat::expect_true(
    length(parse_spans_cpp("| [This text is highlighted]{.mark}      |                                           |")) >= 1
  )
})

test_that("examples/quarto-web/docs/authoring/tables.qmd", {
  # Line 556
  testthat::expect_true(
    length(parse_spans_cpp("Tables containing cells spanning multiple rows or columns are supported across output formats[except in PDF margins]{.aside}.")) >= 1
  )
})

test_that("examples/quarto-web/docs/blog/posts/2022-02-17-advanced-layout/index.qmd", {
  # Line 93
  testthat::expect_true(
    length(parse_spans_cpp("Asides allow you to place content aside from the content it is placed in. Asides look like footnotes, but do not include the footnote mark (the superscript number). [This is a span that has the class `aside` which places it in the margin without a footnote number.]{.aside}")) >= 1
  )
  # Line 96
  testthat::expect_true(
    length(parse_spans_cpp("[This is a span that has the class aside which places it in the margin without a footnote number.]{.aside}")) >= 1
  )
})

test_that("examples/quarto-web/docs/blog/posts/2024-07-11-1.5-release/index.qmd", {
  # Line 25
  testthat::expect_true(
    length(parse_spans_cpp("Here is a [span with a green background]{style=\"background-color:green\"}.")) >= 1
  )
})

test_that("examples/quarto-web/docs/download/tarball.qmd", {
  # Line 15
  testthat::expect_true(
    length(parse_spans_cpp("[Find your operating system in the table below]{#download-text .hidden .download-text}")) >= 1
  )
})

test_that("examples/quarto-web/docs/output-formats/ms-word-templates.qmd", {
  # Line 46
  testthat::expect_true(
    length(parse_spans_cpp("[Get out]{custom-style=\"Emphasis\"}, he said.")) >= 1
  )
})

test_that("examples/quarto-web/docs/output-formats/typst.qmd", {
  # Line 192
  testthat::expect_true(
    length(parse_spans_cpp("Here is a [span with a green background]{style=\"background-color:green\"}.")) >= 1
  )
})

test_that("examples/quarto-web/docs/presentations/revealjs/themes.qmd", {
  # Line 198
  testthat::expect_true(
    length(parse_spans_cpp("|                          | | `note`      | [`#0d6efd`]{.color-box} |                                                                                                                          |")) >= 1
  )
  # Line 199
  testthat::expect_true(
    length(parse_spans_cpp("|                          | | `tip`       | [`#198754`]{.color-box} |                                                                                                                          |")) >= 1
  )
  # Line 200
  testthat::expect_true(
    length(parse_spans_cpp("|                          | | `caution`   | [`#fd7e14`]{.color-box} |                                                                                                                          |")) >= 1
  )
  # Line 201
  testthat::expect_true(
    length(parse_spans_cpp("|                          | | `warning`   | [`#ffc107`]{.color-box} |                                                                                                                          |")) >= 1
  )
  # Line 202
  testthat::expect_true(
    length(parse_spans_cpp("|                          | | `important` | [`#dc3545`]{.color-box} |                                                                                                                          |")) >= 1
  )
})

test_that("examples/quarto-web/docs/triaging/index.qmd", {
  # Line 98
  testthat::expect_true(
    length(parse_spans_cpp("    - [*Close as completed*]{.badge .rounded-pill .text-bg-primary}: The issue has been resolved with a pull request linked to the issue.")) >= 1
  )
  # Line 99
  testthat::expect_true(
    length(parse_spans_cpp("    - [*Close as not planned*]{.badge .rounded-pill .text-bg-primary}: The issue is not planned to be resolved, was marked by CI/CD as [`stale`](https://github.com/quarto-dev/quarto-cli/labels/stale) because of a lack of reproducibility ([`needs-repro` label](https://github.com/quarto-dev/quarto-cli/labels/needs-repro)), is actually a [`support`](https://github.com/quarto-dev/quarto-cli/labels/support) / discussion issue, or is no longer relevant.")) >= 1
  )
  # Line 100
  testthat::expect_true(
    length(parse_spans_cpp("    - [*Close as duplicate*]{.badge .rounded-pill .text-bg-primary}: The issue is a duplicate of another issue ([`duplicate`](https://github.com/quarto-dev/quarto-cli/labels/duplicate)).")) >= 1
  )
  # Line 147
  testthat::expect_true(
    length(parse_spans_cpp("- If a discussion appears to be a bug report and can be reproduced, use [*Create issue from discussion*]{.badge .rounded-pill .text-bg-primary} GitHub feature to convert it into an issue.")) >= 1
  )
  # Line 148
  testthat::expect_true(
    length(parse_spans_cpp("- [*Close as outdated*]{.badge .rounded-pill .text-bg-primary} the discussion and link to the newly created issue.")) >= 1
  )
})

test_that("examples/quarto-web/docs/websites/website-tools.qmd", {
  # Line 323
  testthat::expect_true(
    length(parse_spans_cpp("Change [cookie preferences]{#open_preferences_center}")) >= 1
  )
})

test_that("examples/quarto-web/index.qmd", {
  # Line 23
  testthat::expect_true(
    length(parse_spans_cpp("# Welcome to Quarto^[®]{.trademark}^ {.mt-1}")) >= 1
  )
})

Try the parsermd package in your browser

Any scripts or data that you put into this service are public.

parsermd documentation built on Aug. 21, 2025, 5:27 p.m.