| 1 |
# copy_package_tree creates package dir |
| 2 |
|
| 3 |
Code |
| 4 |
sort(dir(tmp, recursive = TRUE, include.dirs = TRUE)) |
| 5 |
Output |
| 6 |
[1] "testDummy" "testDummy/DESCRIPTION" "testDummy/NAMESPACE" |
| 7 |
[4] "testDummy/R" "testDummy/R/a.R" "testDummy/R/b.R" |
| 8 |
|
| 9 |
--- |
| 10 |
|
| 11 |
Code |
| 12 |
sort(dir(tmp, recursive = TRUE, include.dirs = TRUE)) |
| 13 |
Output |
| 14 |
[1] "testDummy" "testDummy/DESCRIPTION" "testDummy/NAMESPACE" |
| 15 |
[4] "testDummy/R" "testDummy/R/a.R" "testDummy/R/b.R" |
| 16 |
|
| 17 |
# copy_package_tree errors |
| 18 |
|
| 19 |
Code |
| 20 |
copy_package_tree(test_path("testDummy"), tmp) |
| 21 |
Condition |
| 22 |
Error in `copy_package_tree()`: |
| 23 |
! Cannot copy package tree to '<tempdir>/pkgbuild-test-<id>' |
| 24 |
i Directory '<tempdir>/pkgbuild-test-<id>/testDummy' already exists, and did not want to overwrite. |
| 25 |
|
| 26 |
# exclusions |
| 27 |
|
| 28 |
Code |
| 29 |
files[, c("path", "exclude", "isdir", "trimmed")] |
| 30 |
Output |
| 31 |
path exclude isdir trimmed |
| 32 |
1 .RData TRUE FALSE FALSE |
| 33 |
2 .Rbuildignore FALSE FALSE FALSE |
| 34 |
3 .Rhistory TRUE FALSE FALSE |
| 35 |
4 .git TRUE TRUE FALSE |
| 36 |
5 DESCRIPTION FALSE FALSE FALSE |
| 37 |
6 docs TRUE TRUE FALSE |
| 38 |
7 src FALSE TRUE TRUE |
| 39 |
8 src/.DS_Store TRUE FALSE FALSE |
| 40 |
9 src/foo.c.bak TRUE FALSE FALSE |
| 41 |
10 src/foo.c.swp TRUE FALSE FALSE |
| 42 |
11 src/foo.c~ TRUE FALSE FALSE |
| 43 |
12 src/foo.d TRUE FALSE FALSE |
| 44 |
13 src/src.c FALSE FALSE FALSE |
| 45 |
14 src/src.o TRUE FALSE FALSE |
| 46 |
|
| 47 |
# get_copy_method |
| 48 |
|
| 49 |
Code |
| 50 |
get_copy_method() |
| 51 |
Condition |
| 52 |
Error in `check_method()`: |
| 53 |
! Invalid `pkg.build_copy_method` value: "foobar". |
| 54 |
i It must be one of "none", "copy", and "link". |
| 55 |
|
| 56 |
--- |
| 57 |
|
| 58 |
Code |
| 59 |
get_copy_method() |
| 60 |
Condition |
| 61 |
Error in `get_copy_method()`: |
| 62 |
! Invalid `pkg.build_copy_method` value. |
| 63 |
i It must be a string, but it is an integer vector. |
| 64 |
|
| 65 |
# Ignoring .Rbuildignore |
| 66 |
|
| 67 |
Code |
| 68 |
files[, c("path", "exclude", "isdir", "trimmed")] |
| 69 |
Output |
| 70 |
path exclude isdir trimmed |
| 71 |
1 .Rbuildignore FALSE FALSE FALSE |
| 72 |
2 DESCRIPTION FALSE FALSE FALSE |
| 73 |
3 docs TRUE TRUE FALSE |
| 74 |
4 src FALSE TRUE TRUE |
| 75 |
5 src/src.c FALSE FALSE FALSE |
| 76 |
6 src/src.o TRUE FALSE FALSE |
| 77 |
|
| 78 |
# copying on windows |
| 79 |
|
| 80 |
Code |
| 81 |
sort(dir(tmp, recursive = TRUE, include.dirs = TRUE)) |
| 82 |
Output |
| 83 |
[1] "testDummy" "testDummy/DESCRIPTION" "testDummy/NAMESPACE" |
| 84 |
[4] "testDummy/R" "testDummy/R/a.R" "testDummy/R/b.R" |
| 85 |
|
| 86 |
# cp error |
| 87 |
|
| 88 |
Code |
| 89 |
cp("foo", "bar") |
| 90 |
Condition |
| 91 |
Error in `cp()`: |
| 92 |
! Could not copy package files. |
| 93 |
i Failed to copy 'foo' to 'bar'. |
| 94 |
|
| 95 |
# detect_cp_args |
| 96 |
|
| 97 |
Code |
| 98 |
detect_cp_args() |
| 99 |
Output |
| 100 |
[1] "-pLR" |
| 101 |
|
| 102 |
--- |
| 103 |
|
| 104 |
Code |
| 105 |
detect_cp_args() |
| 106 |
Output |
| 107 |
[1] "-LR" "--preserve=timestamps" |
| 108 |
|
| 109 |
# cp error on Unix |
| 110 |
|
| 111 |
Code |
| 112 |
cp("foo", "bar") |
| 113 |
Condition |
| 114 |
Error in `cp()`: |
| 115 |
! Could not copy package files. |
| 116 |
i Failed to copy 'foo' to 'bar'. |
| 117 |
|