-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# basic edition infrastructure works as intended | ||
|
||
Code | ||
edition_deprecate(2025, what = "foo()") | ||
Condition | ||
Error: | ||
! `foo()` was deprecated in ggplot2 edition 2025 and is now defunct. | ||
|
||
--- | ||
|
||
Code | ||
edition_require(2025, what = "foo()") | ||
Condition | ||
Error in `edition_require()`: | ||
! foo() requires the 2025 edition of ggplot2. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
test_that("basic edition requirement and deprecation works as intended", { | ||
|
||
local_edition(2025) | ||
expect_snapshot(edition_deprecate(2025, what = "foo()"), error = TRUE) | ||
expect_silent(edition_require(2025, what = "foo()")) | ||
|
||
local_edition(2024) | ||
expect_silent(edition_deprecate(2025, what = "foo()")) | ||
expect_snapshot(edition_require(2025, what = "foo()"), error = TRUE) | ||
}) |