pkgsrc-Changes archive

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

CVS commit: pkgsrc/pkgtools/R2pkg



Module Name:    pkgsrc
Committed By:   rillig
Date:           Sat Oct 19 15:47:03 UTC 2019

Modified Files:
        pkgsrc/pkgtools/R2pkg: Makefile
        pkgsrc/pkgtools/R2pkg/files: R2pkg.R R2pkg_test.R RELEASE

Log Message:
pkgtools/R2pkg: update to 0.6.3

Changes since 0.6.1:

* Fix comparison of articles (a, an) in comments.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/pkgtools/R2pkg/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/pkgtools/R2pkg/files/R2pkg.R
cvs rdiff -u -r1.14 -r1.15 pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R
cvs rdiff -u -r1.5 -r1.6 pkgsrc/pkgtools/R2pkg/files/RELEASE

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/R2pkg/Makefile
diff -u pkgsrc/pkgtools/R2pkg/Makefile:1.9 pkgsrc/pkgtools/R2pkg/Makefile:1.10
--- pkgsrc/pkgtools/R2pkg/Makefile:1.9  Sun Oct 13 19:13:47 2019
+++ pkgsrc/pkgtools/R2pkg/Makefile      Sat Oct 19 15:47:03 2019
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.9 2019/10/13 19:13:47 rillig Exp $
+# $NetBSD: Makefile,v 1.10 2019/10/19 15:47:03 rillig Exp $
 #
 
-VERS=          0.6.2
+VERS=          0.6.3
 PKGNAME=       R2pkg-${VERS}
 CATEGORIES=    pkgtools
 

Index: pkgsrc/pkgtools/R2pkg/files/R2pkg.R
diff -u pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.19 pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.20
--- pkgsrc/pkgtools/R2pkg/files/R2pkg.R:1.19    Sat Oct 19 14:52:40 2019
+++ pkgsrc/pkgtools/R2pkg/files/R2pkg.R Sat Oct 19 15:47:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: R2pkg.R,v 1.19 2019/10/19 14:52:40 rillig Exp $
+# $NetBSD: R2pkg.R,v 1.20 2019/10/19 15:47:03 rillig Exp $
 #
 # Copyright (c) 2014,2015,2016,2017,2018,2019
 #      Brook Milligan.  All rights reserved.
@@ -336,11 +336,7 @@ read.file.as.values <- function(filename
 simplify.whitespace <- function(s) gsub('[[:blank:]]+', ' ', s)
 remove.punctuation <- function(s) gsub('[,-]', '', s)
 remove.quotes <- function(s) gsub('[\'`"]', '', s)
-remove.articles <- function(s)
-{
-  pattern <- '^([[:blank:]]*)An* |([[:blank:]]+)[Aa]n*[[:blank:]]+'
-  gsub(pattern,'\\1',s)
-}
+remove.articles <- function(s) gsub('\\b[Aa]n?\\b', '\\1', s)
 
 case.insensitive.equals <- function(s1,s2)
 {

Index: pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R
diff -u pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.14 pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.15
--- pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R:1.14       Sat Oct 19 14:52:40 2019
+++ pkgsrc/pkgtools/R2pkg/files/R2pkg_test.R    Sat Oct 19 15:47:03 2019
@@ -1,4 +1,4 @@
-# $NetBSD: R2pkg_test.R,v 1.14 2019/10/19 14:52:40 rillig Exp $
+# $NetBSD: R2pkg_test.R,v 1.15 2019/10/19 15:47:03 rillig Exp $
 #
 # Copyright (c) 2019
 #      Roland Illig.  All rights reserved.
@@ -204,14 +204,13 @@ test_that('fix.continued.lines', {
         '\tvalue',
         'VAR2=\tvalue')
 
-    expect_printed(
-        data.frame(varassign = mklines$key_value, line = mklines$line),
-        '  varassign              line',
-        '1     FALSE      # comment \\\\',
-        '2      TRUE continued=comment',  # FIXME: continuation from line 1
-        '3      TRUE             VAR1=',
-        '4      TRUE      VAR1+=\\tvalue',  # FIXME: extra space at the beginning
-        '5      TRUE       VAR2=\\tvalue')
+    expect_equal(mklines$key_value, c(FALSE, TRUE, TRUE, TRUE, TRUE))
+    expect_equal(mklines$line, c(
+        '# comment \\',
+        'continued=comment',  # FIXME: continuation from line 1
+        'VAR1=',
+        'VAR1+=\tvalue',  # FIXME: extra space at the beginning
+        'VAR2=\tvalue'))
     message$expect_messages(
         '[ 321 ] WARNING: unhandled continued line(s)')
 })
@@ -335,11 +334,11 @@ test_that('remove.quotes', {
 })
 
 test_that('remove.articles', {
-    expect_equal(remove.articles('Get a life'), 'Getlife')  # FIXME
-    expect_equal(remove.articles('An apple a day'), 'appleday')  # FIXME
-    expect_equal(remove.articles('Annnnnnnnnn apple'), 'apple')  # FIXME
-    expect_equal(remove.articles('Grade A'), 'Grade A')
-    expect_equal(remove.articles('Grade A is best'), 'Gradeis best')  # FIXME
+    expect_equal(remove.articles('Get a life'), 'Get  life')
+    expect_equal(remove.articles('An apple a day'), ' apple  day')  # TODO: uppercase the first letter
+    expect_equal(remove.articles('Annnnnnnnnn apple'), 'Annnnnnnnnn apple')
+    expect_equal(remove.articles('Grade A'), 'Grade ')
+    expect_equal(remove.articles('Grade A is best'), 'Grade  is best')
 })
 
 test_that('case.insensitive.equals', {

Index: pkgsrc/pkgtools/R2pkg/files/RELEASE
diff -u pkgsrc/pkgtools/R2pkg/files/RELEASE:1.5 pkgsrc/pkgtools/R2pkg/files/RELEASE:1.6
--- pkgsrc/pkgtools/R2pkg/files/RELEASE:1.5     Sun Oct 13 13:26:22 2019
+++ pkgsrc/pkgtools/R2pkg/files/RELEASE Sat Oct 19 15:47:03 2019
@@ -1,4 +1,4 @@
-$NetBSD: RELEASE,v 1.5 2019/10/13 13:26:22 rillig Exp $
+$NetBSD: RELEASE,v 1.6 2019/10/19 15:47:03 rillig Exp $
 
 RELEASE
 =======
@@ -54,7 +54,7 @@ R2pkg v.0.6 (2019-08-08)
 * Annotate generated comments with [R2pkg] to make them easier to find.
 
 R2pkg v.0.6.1 (2019-10-13)
-------------------------
+--------------------------
 
 * Run properly even if TMPDIR is not set.
 
@@ -63,3 +63,10 @@ R2pkg v.0.6.1 (2019-10-13)
 * Write error messages to stderr instead of stdout.
 
 * Separate R source code from shell code.
+
+R2pkg v0.6.3 (2019-10-19)
+-------------------------
+
+* Fix comparison of articles (a, an) in comments.
+
+* Lots of refactorings.



Home | Main Index | Thread Index | Old Index