File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ # basic edition infrastructure works as intended
2
+
3
+ Code
4
+ edition_deprecate(2025, what = "foo()")
5
+ Condition
6
+ Error:
7
+ ! `foo()` was deprecated in ggplot2 edition 2025 and is now defunct.
8
+
9
+ ---
10
+
11
+ Code
12
+ edition_require(2025, what = "foo()")
13
+ Condition
14
+ Error in `edition_require()`:
15
+ ! foo() requires the 2025 edition of ggplot2.
16
+
Original file line number Diff line number Diff line change
1
+ test_that(" basic edition requirement and deprecation works as intended" , {
2
+
3
+ local_edition(2025 )
4
+ expect_snapshot(edition_deprecate(2025 , what = " foo()" ), error = TRUE )
5
+ expect_silent(edition_require(2025 , what = " foo()" ))
6
+
7
+ local_edition(2024 )
8
+ expect_silent(edition_deprecate(2025 , what = " foo()" ))
9
+ expect_snapshot(edition_require(2025 , what = " foo()" ), error = TRUE )
10
+ })
You can’t perform that action at this time.
0 commit comments