[Pkg-javascript-commits] [node-tap-mocha-reporter] 122/137: Add tap_mocha-reporter man page

Bastien Roucariès rouca at moszumanska.debian.org
Thu Sep 7 09:49:32 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-tap-mocha-reporter.

commit 96f0edf356a4260c0faed857fdf89330345c2f59
Author: Bastien ROUCARIÈS <roucaries.bastien at gmail.com>
Date:   Tue Aug 22 21:08:07 2017 +0200

    Add tap_mocha-reporter man page
---
 debian/manpages                    |  1 +
 debian/rules                       | 40 ++++++++++++++++++++++----
 debian/tap-mocha-reporter.1.xml.in | 58 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 93 insertions(+), 6 deletions(-)

diff --git a/debian/manpages b/debian/manpages
new file mode 100644
index 0000000..b8a09c9
--- /dev/null
+++ b/debian/manpages
@@ -0,0 +1 @@
+debian/tap-mocha-reporter.1
diff --git a/debian/rules b/debian/rules
index c2af535..e162595 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,8 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+include /usr/share/dpkg/pkg-info.mk
+
 # run the test using local copy instead of installed one
 RUN_TEST_LOCAL?=1
 
@@ -15,14 +17,16 @@ TAP_MOCHA_JSPATH?= tap-mocha-reporter
 TAP_MOCHA_INSTALL_PATH?=/usr/bin/tap-mocha-reporter
 endif
 
+
 # newline for make
 define newline
 
 
 endef
+space := $(subst ,, )
 
 # find all reporter supported
-define FIND_REPORTER_JS
+define FIND_REPORTER_JS_RAW
     'use strict';
     try {
 	var F = require('$(TAP_MOCHA_JSPATH)');
@@ -33,25 +37,49 @@ define FIND_REPORTER_JS
 	process.exit(1);
     }
 endef
-
+FIND_REPORTER_JS:=$(subst $(newline),,$(FIND_REPORTER_JS_RAW))
+REPORTER_LIST_RAW:=$(shell set -e; node -pe "$(FIND_REPORTER_JS)" | sed -E -e 's/[[:space:]]+/ /g')
+REPORTER_LIST:=$(subst $(newline), ,$(strip $(REPORTER_LIST_RAW)))
 
 %:
 	dh $@
 
 #override_dh_auto_build:
 
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
 override_dh_auto_test: run_test_suite
+else
+override_dh_auto_test:
+endif
 
 # run a smoke test
 run_test_suite:
+	$(info List of reporter: $(REPORTER_LIST))
 	set -e; \
-	LIST=`set -e; node -pe "$(subst $(newline),,$(FIND_REPORTER_JS))"`;  \
-	echo "List of reporter: $$LIST";  \
-	for r in $$LIST; do  \
+	for r in $(REPORTER_LIST); do  \
 		echo "Use reporter $$r";  \
 		echo "=========================================================" ; \
 		tap test/*.js | $(TAP_MOCHA_INSTALL_PATH) $$r ; \
 		echo "=========================================================" ; \
 	done
 
-#.PHONY run_test_suite
+%.1.xml : %.1.xml.in
+	sed -e "s/@VERSION@/$(DEB_VERSION_UPSTREAM)/g" -e 's, at LIST_OFENTRY@,$(subst $(space),</para></listitem><listitem><para>,$(REPORTER_LIST)),g' $< > $@
+%.1: %.1.xml
+	cd $(dir $<) &&  docbook2x-man --encoding=utf-8 $(notdir $<)
+
+ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
+override_dh_installman: debian/tap-mocha-reporter.1
+	dh_installman
+else
+override_dh_installman:
+endif
+
+override_dh_installman_clean:
+	rm -rf debian/*.1.xml
+	rm -rf debian/*.1
+
+override_dh_clean: override_dh_installman_clean
+	dh_clean
+
+.PHONY: run_test_suite override_dh_installman_clean
diff --git a/debian/tap-mocha-reporter.1.xml.in b/debian/tap-mocha-reporter.1.xml.in
new file mode 100644
index 0000000..9bb8607
--- /dev/null
+++ b/debian/tap-mocha-reporter.1.xml.in
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<refentry id='tapmochareporter1'>
+  <refmeta>
+    <refentrytitle>tap-mocha-reporter</refentrytitle>
+    <manvolnum>1</manvolnum>
+    <refmiscinfo class='source'>August 2017</refmiscinfo>
+    <refmiscinfo class='manual'>tap-mocha-reporter @VERSION@</refmiscinfo>
+  </refmeta>
+  <refnamediv>
+    <refname>tap-mocha-reporter</refname>
+    <refpurpose>format output of tap using mocha like reporter</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>tap-mocha-reporter</command>
+      <group choice="req">
+	<arg choice="plain">
+	  --help
+	</arg>
+        <arg choice="plain">
+          reporter
+        </arg>
+      </group>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+
+  <refsect1 id='description'><title>DESCRIPTION</title>
+
+  <para> Reads TAP data on stdin, and formats to stdout using the specified
+  reporter.  (Note that some reporters write to files instead of stdout.)</para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>OPTIONS</title>
+    <para>Available reporter format types are:
+    <itemizedlist>
+    <listitem>
+      <para>@LIST_OFENTRY@</para>
+    </listitem>
+    </itemizedlist>
+  </para>
+  
+  </refsect1>
+
+  <refsect1 id="seealso">
+    <title>See Also</title>
+    <simplelist type="inline">
+      <member><citerefentry><refentrytitle>tap</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> 
+    </simplelist>
+  </refsect1>
+
+</refentry>
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-tap-mocha-reporter.git



More information about the Pkg-javascript-commits mailing list