pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/R2pkg/files pkgtools/R2pkg: remove unused code



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8bc6a3498457
branches:  trunk
changeset: 416161:8bc6a3498457
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Oct 19 22:10:58 2019 +0000

description:
pkgtools/R2pkg: remove unused code

diffstat:

 pkgtools/R2pkg/files/R2pkg.R      |  10 ++++------
 pkgtools/R2pkg/files/R2pkg_test.R |  12 +-----------
 2 files changed, 5 insertions(+), 17 deletions(-)

diffs (50 lines):

diff -r 1fdaddcf33f2 -r 8bc6a3498457 pkgtools/R2pkg/files/R2pkg.R
--- a/pkgtools/R2pkg/files/R2pkg.R      Sat Oct 19 21:32:02 2019 +0000
+++ b/pkgtools/R2pkg/files/R2pkg.R      Sat Oct 19 22:10:58 2019 +0000
@@ -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.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 -r 1fdaddcf33f2 -r 8bc6a3498457 pkgtools/R2pkg/files/R2pkg_test.R
--- a/pkgtools/R2pkg/files/R2pkg_test.R Sat Oct 19 21:32:02 2019 +0000
+++ b/pkgtools/R2pkg/files/R2pkg_test.R Sat Oct 19 22:10:58 2019 +0000
@@ -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 @@
     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'),



Home | Main Index | Thread Index | Old Index