Skip to content

Commit

Permalink
test: add frontmatter snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
hougesen committed Mar 16, 2024
1 parent 8d39a30 commit 5d94036
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/cat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,15 @@ title "stupicat"
WITH_SNAPSHOT="$snapshot/stupicat-indented-code-block" \
expect_run_sh $SUCCESSFULLY "${exe[*]} $fixture/indented-code-block.md 2>/dev/null"
)

(with "yaml frontmatter"
it "succeeds" && \
WITH_SNAPSHOT="$snapshot/stupicat-yaml-frontmatter-output" \
expect_run_sh $SUCCESSFULLY "${exe[*]} $fixture/yaml-frontmatter.md 2>/dev/null"
)

(with "toml frontmatter"
it "succeeds" && \
WITH_SNAPSHOT="$snapshot/stupicat-toml-frontmatter-output" \
expect_run_sh $SUCCESSFULLY "${exe[*]} $fixture/toml-frontmatter.md 2>/dev/null"
)
5 changes: 5 additions & 0 deletions tests/fixtures/snapshots/stupicat-toml-frontmatter-output
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
key = value
+++

# Frontmatter should be supported
5 changes: 5 additions & 0 deletions tests/fixtures/snapshots/stupicat-yaml-frontmatter-output
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
key: value
---

# Frontmatter should be supported
5 changes: 5 additions & 0 deletions tests/fixtures/toml-frontmatter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
key = value
+++

# Frontmatter should be supported
5 changes: 5 additions & 0 deletions tests/fixtures/yaml-frontmatter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
key: value
---

# Frontmatter should be supported

0 comments on commit 5d94036

Please sign in to comment.