Skip to content

Commit 5b03b34

Browse files
Merge branch 'develop' of github.com:HenrikBengtsson/progressr into develop [ci skip]
2 parents 5ca2108 + 99256ee commit 5b03b34

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/with_progress,delay.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ for (delay in c(FALSE, TRUE)) {
3434
message(sprintf("- with_progress() - delay = %s ...", delay))
3535
output <- record_output({
3636
with_progress({
37-
y <- slow_sum(x, stdout=TRUE, message=TRUE)
37+
y <- slow_sum(x, stdout=TRUE, message=TRUE)
3838
}, delay_stdout = delay,
39-
delay_conditions = if (delay) "condition" else character(0L))
39+
delay_conditions = if (delay) "condition" else character(0L))
4040
})
4141
stopifnot(identical(output$stdout, output_truth$stdout))
4242
stopifnot(identical(output$conditions, output_truth$conditions))

tests/with_progress.R

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ message("with_progress() - filesize ...")
3535

3636
with_progress({
3737
sum <- slow_sum(x)
38-
}, handler_filesize())
38+
}, handlers = handler_filesize())
3939
print(sum)
4040
stopifnot(sum == truth)
4141

@@ -47,7 +47,7 @@ message("with_progress() - utils::txtProgressBar() ...")
4747
if (requireNamespace("utils")) {
4848
with_progress({
4949
sum <- slow_sum(x)
50-
}, handler_txtprogressbar(style = 2L))
50+
}, handlers = handler_txtprogressbar(style = 2L))
5151
print(sum)
5252
stopifnot(sum == truth)
5353
}
@@ -59,7 +59,7 @@ message("with_progress() - tcltk::tkProgressBar() ...")
5959

6060
with_progress({
6161
sum <- slow_sum(x)
62-
}, handler_tkprogressbar)
62+
}, handlers = handler_tkprogressbar)
6363

6464
message("with_progress() - tcltk::tkProgressBar() ... done")
6565

@@ -68,7 +68,7 @@ message("with_progress() - utils::winProgressBar() ...")
6868

6969
with_progress({
7070
sum <- slow_sum(x)
71-
}, handler_winprogressbar)
71+
}, handlers = handler_winprogressbar)
7272

7373
message("with_progress() - utils::winProgressBar() ... done")
7474

@@ -79,7 +79,7 @@ if (requireNamespace("progress")) {
7979
## Display progress using default handler
8080
with_progress({
8181
sum <- slow_sum(x)
82-
}, handler_progress(clear = FALSE))
82+
}, handlers = handler_progress(clear = FALSE))
8383
print(sum)
8484
stopifnot(sum == truth)
8585
}
@@ -91,7 +91,7 @@ message("with_progress() - pbmcapply::progressBar() ...")
9191

9292
with_progress({
9393
sum <- slow_sum(x)
94-
}, handler_pbmcapply)
94+
}, handlers = handler_pbmcapply)
9595

9696
message("with_progress() - pbmcapply::progressBar() ... done")
9797

@@ -100,7 +100,7 @@ message("with_progress() - ascii_alert ...")
100100

101101
with_progress({
102102
sum <- slow_sum(x)
103-
}, handler_ascii_alert())
103+
}, handlers = handler_ascii_alert())
104104
print(sum)
105105
stopifnot(sum == truth)
106106

@@ -111,7 +111,7 @@ message("with_progress() - beepr::beep() ...")
111111

112112
with_progress({
113113
sum <- slow_sum(x)
114-
}, handler_beepr)
114+
}, handlers = handler_beepr)
115115
print(sum)
116116
stopifnot(sum == truth)
117117

@@ -122,7 +122,7 @@ message("with_progress() - notifier::notify() ...")
122122

123123
with_progress({
124124
sum <- slow_sum(x)
125-
}, handler_notifier)
125+
}, handlers = handler_notifier)
126126
print(sum)
127127
stopifnot(sum == truth)
128128

@@ -134,7 +134,7 @@ message("with_progress() - void ...")
134134
## Mute progress updates
135135
with_progress({
136136
sum <- slow_sum(x)
137-
}, NULL)
137+
}, handlers = NULL)
138138
print(sum)
139139
stopifnot(sum == truth)
140140

0 commit comments

Comments
 (0)