Skip to content

Commit fbb1b9c

Browse files
committed
Avoid shadowing message in autoprint tests
Comparing ‘autoprint.Rout’ to ‘autoprint.Rout.save’ ...4,10d3 < < Attaching package: 'data.table' < < The following object is masked from 'package:base': < < %notin% <
1 parent 3c044ce commit fbb1b9c

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

tests/autoprint.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
require(data.table)
1+
suppressPackageStartupMessages(require(data.table))
22
# Tests the suppression of := output
33
# Since this tests autoprinting at the console, it needs to use the .Rout.save mechanism in R CMD check
44
DT = data.table(a=1:2) # Should print at console?

tests/autoprint.Rout.save

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ Type 'demo()' for some demos, 'help()' for on-line help, or
1515
'help.start()' for an HTML browser interface to help.
1616
Type 'q()' to quit R.
1717

18-
> require(data.table)
19-
Loading required package: data.table
18+
> suppressPackageStartupMessages(require(data.table))
2019
> # Tests the suppression of := output
2120
> # Since this tests autoprinting at the console, it needs to use the .Rout.save mechanism in R CMD check
2221
> DT = data.table(a=1:2) # Should print at console?

0 commit comments

Comments
 (0)