Commit 7171d64
committed
test: cover the survivor lines of the dead-code removal (#98)
Address self-review nits on PR #99:
- nit 1: drop the inert `file.create(fake_tar)` + `on.exit`
setup. With `update_tar_gz = FALSE`, the `if (update_tar_gz)`
block is skipped and `list.files` never reads the fake file -
the setup did nothing.
- nit 2: add a second test for the `build_from_source = FALSE,
update_tar_gz = TRUE` path. Mocks `pkgbuild::build` (returns a
fake tar.gz path) and `usethis::use_build_ignore` (no-op), then
asserts both bindings were actually called - the survivor lines
of the dead-code removal (`use_build_ignore(files = out)` and
the `cat_green_tick(...)` success message) are now exercised.
This brings the previously-claimed-but-untested 0% region to
covered.1 parent e51fafd commit 7171d64
1 file changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | 162 | | |
166 | 163 | | |
167 | 164 | | |
| |||
176 | 173 | | |
177 | 174 | | |
178 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
179 | 206 | | |
180 | 207 | | |
181 | 208 | | |
| |||
0 commit comments