|
1 |
| -test_that("install_svn", { |
2 |
| - |
3 |
| - skip_on_cran() |
4 |
| - skip_if_offline() |
5 |
| - |
6 |
| - Sys.unsetenv("R_TESTS") |
7 |
| - |
8 |
| - lib <- tempfile() |
9 |
| - on.exit(unlink(lib, recursive = TRUE), add = TRUE) |
10 |
| - dir.create(lib) |
11 |
| - |
12 |
| - url <- "https://github.com/mangothecat/simplegraph/trunk" |
13 |
| - install_svn(url, lib = lib, quiet = TRUE) |
14 |
| - |
15 |
| - expect_silent(packageDescription("simplegraph", lib.loc = lib)) |
16 |
| - expect_equal( |
17 |
| - packageDescription("simplegraph", lib.loc = lib)$RemoteType, |
18 |
| - "svn") |
19 |
| - |
20 |
| - remote <- package2remote("simplegraph", lib = lib) |
21 |
| - expect_s3_class(remote, "remote") |
22 |
| - expect_s3_class(remote, "svn_remote") |
23 |
| - expect_equal(format(remote), "SVN") |
24 |
| - expect_equal(remote$url, url) |
25 |
| - expect_equal(remote$svn_subdir, NULL) |
26 |
| - expect_true(!is.na(remote$revision) && nzchar(remote$revision)) |
27 |
| - expect_equal(remote$args, NULL) |
28 |
| -}) |
29 |
| - |
30 |
| -test_that("install_svn branch", { |
31 |
| - |
32 |
| - skip_on_cran() |
33 |
| - skip_if_offline() |
34 |
| - |
35 |
| - Sys.unsetenv("R_TESTS") |
36 |
| - |
37 |
| - lib <- tempfile() |
38 |
| - on.exit(unlink(lib, recursive = TRUE), add = TRUE) |
39 |
| - dir.create(lib) |
40 |
| - |
41 |
| - url <- "https://github.com/mangothecat/simplegraph" |
42 |
| - install_svn( |
43 |
| - url, |
44 |
| - subdir = "branches/remotes-test", |
45 |
| - lib = lib, |
46 |
| - quiet = TRUE |
47 |
| - ) |
48 |
| - |
49 |
| - expect_silent(packageDescription("simplegraph", lib.loc = lib)) |
50 |
| - expect_equal( |
51 |
| - packageDescription("simplegraph", lib.loc = lib)$RemoteType, |
52 |
| - "svn") |
53 |
| - |
54 |
| - remote <- package2remote("simplegraph", lib = lib) |
55 |
| - expect_s3_class(remote, "remote") |
56 |
| - expect_s3_class(remote, "svn_remote") |
57 |
| - expect_equal(format(remote), "SVN") |
58 |
| - expect_equal(remote$url, url) |
59 |
| - expect_equal(remote$svn_subdir, "branches/remotes-test") |
60 |
| - expect_true(!is.na(remote$revision) && nzchar(remote$revision)) |
61 |
| - expect_equal(remote$args, NULL) |
62 |
| -}) |
63 |
| - |
64 | 1 | test_that("install_svn subdir", {
|
65 | 2 |
|
66 | 3 | skip_on_cran()
|
@@ -98,25 +35,6 @@ test_that("remote_download.svn_remote error", {
|
98 | 35 | )
|
99 | 36 | })
|
100 | 37 |
|
101 |
| -test_that("downloading an SVN revision", { |
102 |
| - |
103 |
| - skip_on_cran() |
104 |
| - skip_if_offline() |
105 |
| - |
106 |
| - x <- list( |
107 |
| - url = "https://github.com/mangothecat/simplegraph/trunk", |
108 |
| - revision = "r28" |
109 |
| - ) |
110 |
| - |
111 |
| - bundle <- remote_download.svn_remote(x) |
112 |
| - on.exit(unlink(bundle), add = TRUE) |
113 |
| - |
114 |
| - expect_output( |
115 |
| - print(list.files(bundle)), |
116 |
| - "DESCRIPTION" |
117 |
| - ) |
118 |
| -}) |
119 |
| - |
120 | 38 | test_that("downloading a wrong SVN revision", {
|
121 | 39 |
|
122 | 40 | skip_on_cran()
|
|
0 commit comments