[r-cran-lavaan] 04/05: Add unittest
Andreas Tille
tille at debian.org
Sat Sep 30 06:05:49 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-cran-lavaan.
commit 601a5bee8829495c9351ac058c7d3dcbafe0e9f8
Author: Andreas Tille <tille at debian.org>
Date: Sat Sep 30 08:00:30 2017 +0200
Add unittest
---
debian/README.test | 8 ++++++++
debian/docs | 3 +++
debian/tests/control | 5 +++++
debian/tests/run-unit-test | 17 +++++++++++++++++
4 files changed, 33 insertions(+)
diff --git a/debian/README.test b/debian/README.test
new file mode 100644
index 0000000..d409f9a
--- /dev/null
+++ b/debian/README.test
@@ -0,0 +1,8 @@
+Notes on how this package can be tested.
+────────────────────────────────────────
+
+This package can be tested by running the provided test:
+
+ sh run-unit-test
+
+in order to confirm its integrity.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..6466d39
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1,3 @@
+debian/tests/run-unit-test
+debian/README.test
+tests
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..a62fb6e
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,5 @@
+Tests: run-unit-test
+Depends: @, r-cran-testthat,
+Restrictions: allow-stderr
+
+
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100644
index 0000000..d2e6c8d
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,17 @@
+#!/bin/sh -e
+
+pkgname=lavaan
+debname=r-cran-lavaan
+
+if [ "$ADTTMP" = "" ] ; then
+ ADTTMP=`mktemp -d /tmp/${debname}-test.XXXXXX`
+ trap "rm -rf $ADTTMP" 0 INT QUIT ABRT PIPE TERM
+fi
+cd $ADTTMP
+cp -a /usr/share/doc/$debname/tests/* $ADTTMP
+gunzip -r *
+for testfile in *.R; do
+ echo "BEGIN TEST $testfile"
+ LC_ALL=C R --no-save < $testfile
+done
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-lavaan.git
More information about the debian-science-commits
mailing list