Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ Non-snapshot tests (logical assertions, error checks, etc.) run fine on any plat
This is a known quirk — don't worry about these specific persistent failures. However, if you see more than ~3 snapshot failures, something real is likely broken and needs investigation.

### Running Tests

The canonical test workflow is to open the devcontainer and run `make testall`. Do not attempt to run the full test suite outside the devcontainer — snapshot tests will fail due to font/rendering differences, and even non-snapshot tests may pull in snapshot comparisons.

```bash
# Via Makefile
# Via Makefile (inside devcontainer)
make testall # Run all tests
make testone testfile="inst/tinytest/test-legend.R" # Run single test file

Expand Down
1 change: 1 addition & 0 deletions R/tinyplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,7 @@ tinyplot.default = function(
.bp = environment(.h)[["base_par"]]
if (is.list(.bp)) .tpars = modifyList(.tpars, .bp)
}
if (!is.null(.tpars[["mar"]])) .theme_mar = .tpars[["mar"]]

# Detect outer-legend sides (order: bottom, left, top, right).
.lgnd_pos = settings$legend_args[["x"]]
Expand Down
80 changes: 80 additions & 0 deletions inst/tinytest/_tinysnapshot/tinytheme_dynmar_mar_override.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions inst/tinytest/test-tinytheme.R
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,12 @@ f = function() {
plt_add(type = "b")
}
expect_snapshot_plot(f, label = "ephemeral_default_theme_add")

# User mar override respected under dynmar (#587)
f = function() {
tinytheme("dynamic", mar = c(5, 5, 5, 5))
plt(0:10, main = "Custom mar override")
box("inner", lty = 2)
tinytheme()
}
expect_snapshot_plot(f, label = "tinytheme_dynmar_mar_override")
Loading