[Pkg-haskell-commits] darcs: shelltestrunner: Statically-build shelltest.1

Iustin Pop iustin at debian.org
Sat May 19 19:15:58 UTC 2012


Wed Mar 28 21:47:33 UTC 2012  Iustin Pop <iustin at debian.org>
  * Statically-build shelltest.1
  Ignore-this: 877a4abedc5c85303a454449edb05b64
  
  Remove the dynamically built shelltest.1 file, so that we get rid of one
  dependency.

    M ./README.source -1 +7
    M ./control -1
    M ./rules -3 +6
    A ./shelltest.1

Wed Mar 28 21:47:33 UTC 2012  Iustin Pop <iustin at debian.org>
  * Statically-build shelltest.1
  Ignore-this: 877a4abedc5c85303a454449edb05b64
  
  Remove the dynamically built shelltest.1 file, so that we get rid of one
  dependency.
diff -rN -u old-shelltestrunner//control new-shelltestrunner//control
--- old-shelltestrunner//control	2012-05-19 19:15:57.226322969 +0000
+++ new-shelltestrunner//control	2012-05-19 19:15:57.350325916 +0000
@@ -7,7 +7,6 @@
   , cdbs
   , haskell-devscripts (>= 0.8)
   , ghc
-  , pandoc
   , libghc-utf8-string-dev (>= 0.3.5)
   , libghc-utf8-string-dev (<< 0.4)
   , libghc-diff-dev (>= 0.1)
diff -rN -u old-shelltestrunner//README.source new-shelltestrunner//README.source
--- old-shelltestrunner//README.source	2012-05-19 19:15:57.226322969 +0000
+++ new-shelltestrunner//README.source	2012-05-19 19:15:57.230325837 +0000
@@ -3,4 +3,10 @@
 such, when importing new upstream versions, the patch should be
 refreshed.
 
- -- Iustin Pop <iustin at debian.org>, Mon, 26 Mar 2012 18:57:31 +0200
+Also note that the built man page is stored in VCS and distributed, in
+order to remove the dependency on pandoc. To (re)built it, install
+pandoc and then run:
+
+make -f debian/rules debian/shelltest.1
+
+ -- Iustin Pop <iustin at debian.org>, Wed, 28 Mar 2012 23:45:47 +0200
diff -rN -u old-shelltestrunner//rules new-shelltestrunner//rules
--- old-shelltestrunner//rules	2012-05-19 19:15:57.206323507 +0000
+++ new-shelltestrunner//rules	2012-05-19 19:15:57.362324830 +0000
@@ -3,7 +3,7 @@
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/hlibrary.mk
 
-build/$(CABAL_PACKAGE) :: build-ghc-stamp debian/shelltest.1
+build/$(CABAL_PACKAGE) :: build-ghc-stamp
 
 install/$(CABAL_PACKAGE) :: build/$(CABAL_PACKAGE)
 	$(DEB_SETUP_BIN_NAME) copy \
@@ -14,5 +14,8 @@
 debian/shelltest.1: debian/shelltest.md
 	pandoc -s -w man $< -o $@
 
-clean::
-	rm -f debian/shelltest.1
+# Note: for now, the built man page is distributed, so that we don't
+# need to build-depend on pandoc.
+
+#clean::
+#	rm -f debian/shelltest.1
diff -rN -u old-shelltestrunner//shelltest.1 new-shelltestrunner//shelltest.1
--- old-shelltestrunner//shelltest.1	1970-01-01 00:00:00.000000000 +0000
+++ new-shelltestrunner//shelltest.1	2012-05-19 19:15:57.266323914 +0000
@@ -0,0 +1,175 @@
+.TH SHELLTEST 1 "March 18 2012" "shelltestrunner" "version 1.2.1"
+.SH NAME
+.PP
+shelltestrunner - test command-line programs or arbitrary shell commands
+.SH SYNOPSIS
+.PP
+shelltest [\f[I]options\f[]] {\f[I]testfiles\f[]|\f[I]testdirs\f[]}
+.SH DESCRIPTION
+.PP
+shelltestrunner tests command-line programs (or arbitrary shell
+commands).
+It reads simple declarative tests specifying a command, some input, and
+the expected output, and can run them run in parallel, selectively, with
+a timeout, in color, and/or with differences highlighted.
+.SH OPTIONS
+.TP
+.B -a, --all
+Show all failure output, even if large
+.RS
+.RE
+.TP
+.B -c, --color
+Show colored output if your terminal supports it
+.RS
+.RE
+.TP
+.B -d, --diff
+Show failures in diff format
+.RS
+.RE
+.TP
+.B -p, --precise
+Show failure output precisely (good for whitespace)
+.RS
+.RE
+.TP
+.B -x \f[I]STR\f[], --exclude=\f[I]STR\f[]
+Exclude test files whose path contains \f[I]STR\f[]
+.RS
+.RE
+.TP
+.B --execdir
+Run tests from within the test file\[aq]s directory.
+Test commands normally run within your current directory;
+\f[C]--execdir\f[] makes them run within the directory where they are
+defined, instead.
+.RS
+.RE
+.TP
+.B --extension=\f[I]EXT\f[]
+Filename suffix of test files (default: \f[I]\&.test\f[])
+.RS
+.RE
+.TP
+.B -w, --with=\f[I]EXECUTABLE\f[]
+Replace the first word of (unindented) test commands.
+This option replaces the first word of all test commands with something
+else, which can be useful for testing alternate versions of a program.
+Commands which have been indented by one or more spaces will not be
+affected by this option.
+.RS
+.RE
+.TP
+.B --debug
+Show debug info, for troubleshooting
+.RS
+.RE
+.TP
+.B --debug-parse
+Show test file parsing info and stop
+.RS
+.RE
+.TP
+.B --help-format
+Display test format help
+.RS
+.RE
+.TP
+.B -?, --help
+Display help message
+.RS
+.RE
+.TP
+.B -V, --version
+Print version information
+.RS
+.RE
+.TP
+.B -- \f[I]TFOPTIONS\f[]
+Set extra test-framework options like \f[C]-j\f[]/\f[C]--threads\f[],
+\f[C]-t\f[]/\f[C]--select-tests\f[], \f[C]-o\f[]/\f[C]--timeout\f[],
+\f[C]--hide-successes\f[].
+Use \f[C]--\ --help\f[] for a list.
+Avoid spaces.
+.RS
+.RE
+.SH DEFINING TESTS
+.PP
+Test files, typically named \f[C]tests/*.test\f[], contain one or more
+tests consisting of:
+.IP \[bu] 2
+a one-line command
+.IP \[bu] 2
+optional standard input (\f[C]<<<\f[]), standard output (\f[C]>>>\f[])
+and/or standard error output (\f[C]>>>2\f[]) specifications
+.IP \[bu] 2
+an exit status (\f[C]>>>=\f[]) specification
+.PP
+\f[B]Test format:\f[]
+.IP
+.nf
+\f[C]
+#\ optional\ comment
+the\ command\ to\ test
+<<<
+zero\ or\ more\ lines\ of\ standard\ input
+>>>
+zero\ or\ more\ lines\ of\ expected\ standard\ output
+(or\ /REGEXP/\ added\ to\ the\ previous\ line)
+>>>2
+zero\ or\ more\ lines\ of\ expected\ standard\ error\ output
+(or\ /REGEXP/\ added\ to\ the\ previous\ line)
+>>>=\ EXITCODE\ (or\ /REGEXP/)
+\f[]
+.fi
+.IP \[bu] 2
+A \f[C]/REGEXP/\f[] pattern may be used instead of explicit data.
+In this case a match anywhere in the output allows the test to pass.
+The regular expression syntax is
+regex-tdfa (http://hackage.haskell.org/package/regex-tdfa)\[aq]s.
+.IP \[bu] 2
+\f[C]EXITCODE\f[] is a numeric exit
+status (http://en.wikipedia.org/wiki/Exit_status), eg \f[C]0\f[] for a
+successful exit.
+.IP \[bu] 2
+You can put \f[C]!\f[] before a \f[C]/REGEXP/\f[] or \f[C]EXITCODE\f[]
+to negate the match.
+.IP \[bu] 2
+Comment lines beginning with \f[C]#\f[] may be used between tests.
+.SH EXAMPLES
+.PP
+Here\[aq]s \f[C]example.test\f[], a file containing two simple tests:
+.IP
+.nf
+\f[C]
+#\ 1.\ let\[aq]s\ test\ that\ echo\ runs.\ Numbering\ your\ tests\ can\ be\ helpful.
+echo
+>>>=\ 0
+
+#\ 2.\ and\ now\ the\ cat\ command.\ On\ windows,\ this\ one\ should\ fail.
+cat
+<<<
+foo
+>>>
+foo
+>>>=\ 0
+\f[]
+.fi
+.PP
+Run it with \f[C]shelltest\f[]:
+.IP
+.nf
+\f[C]
+$\ shelltest\ example.test
+:t.test:1:\ [OK]
+:t.test:2:\ [OK]
+
+\ \ \ \ \ \ \ \ \ Test\ Cases\ \ Total
+\ Passed\ \ 2\ \ \ \ \ \ \ \ \ \ \ 2
+\ Failed\ \ 0\ \ \ \ \ \ \ \ \ \ \ 0
+\ Total\ \ \ 2\ \ \ \ \ \ \ \ \ \ \ 2
+\f[]
+.fi
+.SH AUTHORS
+Simon Michael.





More information about the Pkg-haskell-commits mailing list