diff options
author | rillig <rillig@pkgsrc.org> | 2019-10-19 22:10:58 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2019-10-19 22:10:58 +0000 |
commit | 998a7626b853d9789cbcfaecf3a559031d7db3ea (patch) | |
tree | 2ba3621809a558145ffa8c6caaaa0fad05d3deea /pkgtools/R2pkg | |
parent | 87d76f3c4c2b4bbc9a0a9ae130e17429c3b5fbb1 (diff) | |
download | pkgsrc-998a7626b853d9789cbcfaecf3a559031d7db3ea.tar.gz |
pkgtools/R2pkg: remove unused code
Diffstat (limited to 'pkgtools/R2pkg')
-rw-r--r-- | pkgtools/R2pkg/files/R2pkg.R | 10 | ||||
-rw-r--r-- | pkgtools/R2pkg/files/R2pkg_test.R | 12 |
2 files changed, 5 insertions, 17 deletions
diff --git a/pkgtools/R2pkg/files/R2pkg.R b/pkgtools/R2pkg/files/R2pkg.R index 19d4bfd6caa..00aecf7f1bf 100644 --- a/pkgtools/R2pkg/files/R2pkg.R +++ b/pkgtools/R2pkg/files/R2pkg.R @@ -1,4 +1,4 @@ -# $NetBSD: R2pkg.R,v 1.25 2019/10/19 21:32:02 rillig Exp $ +# $NetBSD: R2pkg.R,v 1.26 2019/10/19 22:10:58 rillig Exp $ # # Copyright (c) 2014,2015,2016,2017,2018,2019 # Brook Milligan. All rights reserved. @@ -51,11 +51,9 @@ level.message <- function(...) level.warning <- function(...) level.message('WARNING: ', ...) -trim.space <- function(s) gsub('[[:space:]]','',s) -trim.blank <- function(s) gsub('[[:blank:]]','',s) -one.space <- function(s) gsub('[[:blank:]]+',' ',s) -one.line <- function(s) gsub('\n',' ',s) -pkg.vers <- function(s) gsub('_','.',s) +trim.space <- function(s) gsub('[[:space:]]', '', s) +one.line <- function(s) gsub('\n', ' ', s) +pkg.vers <- function(s) gsub('_', '.', s) varassign <- function(varname, value) paste0(varname, '=\t', value) relpath_category <- function(relpath) unlist(sapply(strsplit(relpath, '/'), '[', 3)) diff --git a/pkgtools/R2pkg/files/R2pkg_test.R b/pkgtools/R2pkg/files/R2pkg_test.R index cf50604aa0a..a995f60cd3e 100644 --- a/pkgtools/R2pkg/files/R2pkg_test.R +++ b/pkgtools/R2pkg/files/R2pkg_test.R @@ -1,4 +1,4 @@ -# $NetBSD: R2pkg_test.R,v 1.20 2019/10/19 21:32:02 rillig Exp $ +# $NetBSD: R2pkg_test.R,v 1.21 2019/10/19 22:10:58 rillig Exp $ # # Copyright (c) 2019 # Roland Illig. All rights reserved. @@ -122,16 +122,6 @@ test_that('trim.space', { expect_equal(trim.space(' hello, \t\nworld '), 'hello,world') }) -test_that('trim.blank', { - expect_equal(trim.blank(' hello, \t\nworld '), 'hello,\nworld') -}) - -test_that('one.space', { - expect_equal( - one.space(' \t\nhello, \t\nworld \t\n'), - ' \nhello, \nworld \n') -}) - test_that('one.line', { expect_equal( one.line(' \t\nhello, \t\nworld \t\n'), |