chiark / gitweb /
Regression tests for HTML report output master
authorRichard Kettlewell <rjk@greenend.org.uk>
Sat, 17 Aug 2013 17:31:35 +0000 (18:31 +0100)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sat, 17 Aug 2013 17:31:35 +0000 (18:31 +0100)
27 files changed:
tests/Makefile.am
tests/backup
tests/check-file
tests/expect/1.html [new file with mode: 0644]
tests/expect/10.html [new file with mode: 0644]
tests/expect/11.html [new file with mode: 0644]
tests/expect/12.html [new file with mode: 0644]
tests/expect/13.html [new file with mode: 0644]
tests/expect/14.html [new file with mode: 0644]
tests/expect/15.html [new file with mode: 0644]
tests/expect/16.html [new file with mode: 0644]
tests/expect/17.html [new file with mode: 0644]
tests/expect/18.html [new file with mode: 0644]
tests/expect/19.html [new file with mode: 0644]
tests/expect/2.html [new file with mode: 0644]
tests/expect/20.html [new file with mode: 0644]
tests/expect/3.html [new file with mode: 0644]
tests/expect/4.html [new file with mode: 0644]
tests/expect/5.html [new file with mode: 0644]
tests/expect/6.html [new file with mode: 0644]
tests/expect/7.html [new file with mode: 0644]
tests/expect/8.html [new file with mode: 0644]
tests/expect/9.html [new file with mode: 0644]
tests/prune
tests/retire-device
tests/retire-volume
tests/store

index e321858..2d397c9 100644 (file)
@@ -18,5 +18,10 @@ EXTRA_DIST=${TESTS} setup.sh hook \
        expect/14.txt expect/15.txt expect/16.txt expect/17.txt \
        expect/18.txt expect/19.txt expect/1.txt expect/20.txt  \
        expect/2.txt expect/3.txt expect/4.txt expect/5.txt     \
-       expect/6.txt expect/7.txt expect/8.txt expect/9.txt
+       expect/6.txt expect/7.txt expect/8.txt expect/9.txt     \
+       expect/10.html expect/11.html expect/12.html expect/13.html     \
+       expect/14.html expect/15.html expect/16.html expect/17.html     \
+       expect/18.html expect/19.html expect/1.html expect/20.html      \
+       expect/2.html expect/3.html expect/4.html expect/5.html         \
+       expect/6.html expect/7.html expect/8.html expect/9.html
 TESTS_ENVIRONMENT=bash
index e0f5800..05e2c87 100755 (executable)
@@ -19,7 +19,7 @@ set -e
 setup
 
 echo "| --dry-run should do nothing"
-RUN=dryrun RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --dry-run --backup --text got/15.txt host1:volume1
+RUN=dryrun RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --dry-run --backup --text got/15.txt --html got/15.html host1:volume1
 exists dryrun-dev-pre.ran
 exists dryrun-dev-post.ran
 absent dryrun-dev-pre.acted
@@ -32,9 +32,10 @@ absent store1/host1/volume1/1980-01-01
 absent store1/host1/volume2
 absent store2/host1
 compare ${srcdir:-.}/expect/15.txt got/15.txt
+compare ${srcdir:-.}/expect/15.html got/15.html
 
 echo "| Create backup for one volume"
-RUN=volume1 RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/16.txt host1:volume1
+RUN=volume1 RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/16.txt --html got/16.html host1:volume1
 exists volume1-dev-pre.ran
 exists volume1-dev-post.ran
 exists volume1-dev-pre.ran
@@ -49,9 +50,10 @@ absent store1/host1/volume3
 absent store2/host1/volume2
 absent store2/host1/volume3
 compare ${srcdir:-.}/expect/16.txt got/16.txt
+compare ${srcdir:-.}/expect/16.html got/16.html
 
 echo "| Create backup for one host"
-RUN=host1 RSBACKUP_TODAY=1980-01-02 s ${RSBACKUP} --backup --text got/17.txt host1
+RUN=host1 RSBACKUP_TODAY=1980-01-02 s ${RSBACKUP} --backup --text got/17.txt --html got/17.html host1
 exists host1-pre.acted
 exists host1-post.acted
 compare volume1 store1/host1/volume1/1980-01-02
@@ -59,9 +61,10 @@ compare volume2 store1/host1/volume2/1980-01-02
 absent store1/host1/volume3
 compare volume3 store2/host1/volume3/1980-01-02
 compare ${srcdir:-.}/expect/17.txt got/17.txt
+compare ${srcdir:-.}/expect/17.html got/17.html
 
 echo "| Create backup for everything"
-RUN=all RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --text got/18.txt
+RUN=all RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --text got/18.txt --html got/18.html
 exists all-pre.acted
 exists all-post.acted
 compare volume1 store1/host1/volume1/1980-01-03
@@ -69,5 +72,6 @@ compare volume2 store1/host1/volume2/1980-01-03
 absent store1/host1/volume3
 compare volume3 store2/host1/volume3/1980-01-03
 compare ${srcdir:-.}/expect/18.txt got/18.txt
+compare ${srcdir:-.}/expect/18.html got/18.html
 
 cleanup
index 0f066d4..6c81161 100755 (executable)
@@ -20,11 +20,12 @@ setup
 
 echo "| Backup is skipped if check-file missing"
 rm -f volume1/file1
-RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --verbose --text got/19.txt
+RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --verbose --text got/19.txt --html got/19.html
 absent store1/host1/volume1
 compare volume2 store1/host1/volume2/1980-01-03
 absent store1/host1/volume3
 compare volume3 store2/host1/volume3/1980-01-03
 compare ${srcdir:-.}/expect/19.txt got/19.txt
+compare ${srcdir:-.}/expect/19.html got/19.html
 
 cleanup
diff --git a/tests/expect/1.html b/tests/expect/1.html
new file mode 100644 (file)
index 0000000..cb30e4e
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/10.html b/tests/expect/10.html
new file mode 100644 (file)
index 0000000..790e9c6
--- /dev/null
@@ -0,0 +1,134 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="2">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/11.html b/tests/expect/11.html
new file mode 100644 (file)
index 0000000..cb30e4e
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/12.html b/tests/expect/12.html
new file mode 100644 (file)
index 0000000..d1f8199
--- /dev/null
@@ -0,0 +1,138 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Warnings</h2>
+<ul><li>Unknown volume volume2 on host host1</li>
+</ul>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="2">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/13.html b/tests/expect/13.html
new file mode 100644 (file)
index 0000000..1035de5
--- /dev/null
@@ -0,0 +1,135 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="2">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/14.html b/tests/expect/14.html
new file mode 100644 (file)
index 0000000..e118b65
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/15.html b/tests/expect/15.html
new file mode 100644 (file)
index 0000000..cdc3ae8
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/16.html b/tests/expect/16.html
new file mode 100644 (file)
index 0000000..4e56bd4
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/17.html b/tests/expect/17.html
new file mode 100644 (file)
index 0000000..d19b285
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-02)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-02)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-02</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-02</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/18.html b/tests/expect/18.html
new file mode 100644 (file)
index 0000000..577e196
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-03)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-03)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>6</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>3</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-02</td>
+<td class=good>4</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-02</td>
+<td class=bad>2</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/19.html b/tests/expect/19.html
new file mode 100644 (file)
index 0000000..8ff4fba
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-03)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-03)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-03</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/2.html b/tests/expect/2.html
new file mode 100644 (file)
index 0000000..ccc93c2
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-02-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-02-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td class=bad>1980-01-01</td>
+<td class=good>1</td>
+<td class=bad>1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td class=bad>1980-01-01</td>
+<td class=good>1</td>
+<td class=bad>1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/20.html b/tests/expect/20.html
new file mode 100644 (file)
index 0000000..34ef00e
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-02)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-02)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>2</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-02</td>
+<td class=good>2</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/3.html b/tests/expect/3.html
new file mode 100644 (file)
index 0000000..f30e0d7
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-02-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-02-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>2</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/4.html b/tests/expect/4.html
new file mode 100644 (file)
index 0000000..677d574
--- /dev/null
@@ -0,0 +1,146 @@
+<html>
+<head>
+<title>Backup report (1980-02-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-02-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-02</td>
+<td class=good>2</td>
+<td class=bad>1980-01-02</td>
+<td class=good>1</td>
+<td class=bad>1980-01-02</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>4</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>2</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td class=bad>1980-01-02</td>
+<td class=good>2</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<pre class=log>1980-02-01: removed <SRCDIR>/store1/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+1980-02-01: removed <SRCDIR>/store2/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+</pre>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/5.html b/tests/expect/5.html
new file mode 100644 (file)
index 0000000..175593e
--- /dev/null
@@ -0,0 +1,146 @@
+<html>
+<head>
+<title>Backup report (1980-01-03)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-03)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-02</td>
+<td class=good>4</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>6</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>3</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>3</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<pre class=log>1980-02-01: removed <SRCDIR>/store1/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+1980-02-01: removed <SRCDIR>/store2/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+</pre>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/6.html b/tests/expect/6.html
new file mode 100644 (file)
index 0000000..aacc599
--- /dev/null
@@ -0,0 +1,146 @@
+<html>
+<head>
+<title>Backup report (1980-01-04)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-04)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-02</td>
+<td class=good>4</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>6</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>3</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>3</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<pre class=log>1980-02-01: removed <SRCDIR>/store1/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+1980-02-01: removed <SRCDIR>/store2/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+</pre>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/7.html b/tests/expect/7.html
new file mode 100644 (file)
index 0000000..7d33583
--- /dev/null
@@ -0,0 +1,149 @@
+<html>
+<head>
+<title>Backup report (1980-01-04)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-04)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-02</td>
+<td class=good>4</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-02</td>
+<td class=good>4</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>2</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>3</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e4e6cb">1980-01-03</td>
+<td class=good>3</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<pre class=log>1980-02-01: removed <SRCDIR>/store1/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+1980-02-01: removed <SRCDIR>/store2/host1/volume1/1980-01-01 because: age 31 = today 1980-02-01 - backup date 1980-01-01 > minimum 2 and copies 2 - removable 0 > minimum 1
+</pre>
+<pre class=log>1980-01-04: removed <SRCDIR>/store1/host1/volume2/1980-01-01 because: age 3 = today 1980-01-04 - backup date 1980-01-01 > minimum 2 and copies 3 - removable 0 > minimum 2
+1980-01-04: removed <SRCDIR>/store2/host1/volume2/1980-01-01 because: age 3 = today 1980-01-04 - backup date 1980-01-01 > minimum 2 and copies 3 - removable 0 > minimum 2
+</pre>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/8.html b/tests/expect/8.html
new file mode 100644 (file)
index 0000000..cb30e4e
--- /dev/null
@@ -0,0 +1,143 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="4">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+<th colspan="2">device2</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+<th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>2</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>1980-01-01</td>
+<td class=bad>1</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
diff --git a/tests/expect/9.html b/tests/expect/9.html
new file mode 100644 (file)
index 0000000..d2cbb6e
--- /dev/null
@@ -0,0 +1,137 @@
+<html>
+<head>
+<title>Backup report (1980-01-01)</title>
+<style type="text/css">
+/* Copyright © 2011 Richard Kettlewell.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+body {
+  color: black;
+  background-color: white
+}
+
+a:link, a:visited, a:active {
+  color: blue;
+  text-decoration: underline
+}
+
+h1 {
+  background-color: #e0ffe0;
+  padding: 0.2em
+}
+
+h2 {
+  background-color: #e0e0e0;
+  padding: 0.2em
+}
+
+h3 {
+  text-decoration: underline
+}
+
+a.h3 {
+  margin-left: 1em
+}
+
+h1,h2,h3,h4 {
+  font-family: sans-serif
+}
+
+table {
+  border-collapse: collapse
+}
+
+th {
+  background-color: #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  border-top: 1px solid #e0e0e0;
+  border-right: 1px solid #e0e0e0
+}
+
+td {
+  border: 1px solid black;
+  vertical-align: top;
+  padding-left: 4px;
+  padding-right: 4px
+}
+
+td.bad {
+  background-color: #ff4040;
+  color: #ffffff
+}
+
+td.good {
+  background-color: #e0ffe0;
+  color: #000000
+}
+
+span.bad {
+  color: #ff4040
+}
+
+pre.log {
+  background-color: #f0f0f0
+}
+
+div.volume {
+  margin-left: 1em
+}
+
+.recent {
+  color: #ff4040
+}
+</style>
+</head>
+<body><h1>Backup report (1980-01-01)</h1>
+<h2>Warnings</h2>
+<ul><li>Unknown device device2</li>
+</ul>
+<h2>Summary</h2>
+<table><tr><th rowspan="3">Host</th>
+<th rowspan="3">Volume</th>
+<th rowspan="3">Oldest</th>
+<th rowspan="3">Total</th>
+<th colspan="2">Devices</th>
+</tr>
+<tr><th colspan="2">device1</th>
+</tr>
+<tr><th>Newest</th>
+<th>Count</th>
+</tr>
+<tr><td class=host rowspan="3">host1</td>
+<td class=volume>volume1</td>
+<td>1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume2</td>
+<td>1980-01-01</td>
+<td class=good>1</td>
+<td bgcolor="#e0ffe0">1980-01-01</td>
+<td class=good>1</td>
+</tr>
+<tr><td class=volume>volume3</td>
+<td>none</td>
+<td class=bad>0</td>
+<td class=bad>none</td>
+<td class=bad>0</td>
+</tr>
+</table>
+<h2>Logfiles</h2>
+<h3>Pruning logs</h3>
+<p>Generated &#60;timestamp></p>
+</body>
+</html>
index c9e6aa8..d89beee 100755 (executable)
@@ -21,13 +21,14 @@ setup
 ## Check that min-backups is honored correctly
 
 echo "| Create backup"
-RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/1.txt
+RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/1.txt --html got/1.html
 compare volume1 store1/host1/volume1/1980-01-01
 compare volume2 store1/host1/volume2/1980-01-01
 compare ${srcdir:-.}/expect/1.txt got/1.txt
+compare ${srcdir:-.}/expect/1.html got/1.html
 
 echo "| Null prune"
-RUN=null RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --text got/2.txt
+RUN=null RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --text got/2.txt --html got/2.html
 absent null-pre.ran
 absent null-pos.ran
 absent null-dev-pre.ran
@@ -37,17 +38,19 @@ absent null-dev-post.acted
 compare volume1 store1/host1/volume1/1980-01-01
 compare volume2 store1/host1/volume2/1980-01-01
 compare ${srcdir:-.}/expect/2.txt got/2.txt
+compare ${srcdir:-.}/expect/2.html got/2.html
 
 echo "| Create second backup"
-RSBACKUP_TODAY=1980-01-02 s ${RSBACKUP} --backup --text got/20.txt
+RSBACKUP_TODAY=1980-01-02 s ${RSBACKUP} --backup --text got/20.txt --html got/20.html
 # volume1: 1980-01-01 1980-01-02
 # volume2: 1980-01-01 1980-01-02
 compare volume1 store1/host1/volume1/1980-01-02
 compare volume2 store1/host1/volume2/1980-01-02
 compare ${srcdir:-.}/expect/20.txt got/20.txt
+compare ${srcdir:-.}/expect/20.html got/20.html
 
 echo "| --dry-run should do nothing"
-RUN=dryrun RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --dry-run --text got/3.txt
+RUN=dryrun RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --dry-run --text got/3.txt --html got/3.html
 absent dryrun-pre.ran
 absent dryrun-post.ran
 exists dryrun-dev-pre.ran
@@ -59,9 +62,10 @@ compare volume2 store1/host1/volume2/1980-01-01
 compare volume1 store1/host1/volume1/1980-01-02
 compare volume2 store1/host1/volume2/1980-01-02
 compare ${srcdir:-.}/expect/3.txt got/3.txt
+compare ${srcdir:-.}/expect/3.html got/3.html
 
 echo "| Prune affecting volume1"
-RUN=prune1 RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --text got/4.txt
+RUN=prune1 RSBACKUP_TODAY=1980-02-01 s ${RSBACKUP} --prune --text got/4.txt --html got/4.html
 absent prune1-pre.ran
 absent prune1-post.ran
 exists prune1-dev-pre.ran
@@ -73,14 +77,16 @@ compare volume2 store1/host1/volume2/1980-01-01
 compare volume1 store1/host1/volume1/1980-01-02
 compare volume2 store1/host1/volume2/1980-01-02
 sed < got/4.txt > got/4sed.txt "s,${PWD},<SRCDIR>,g"
+sed < got/4.html > got/4sed.html "s,${PWD},<SRCDIR>,g"
 compare ${srcdir:-.}/expect/4.txt got/4sed.txt
+compare ${srcdir:-.}/expect/4.html got/4sed.html
 # volume1:            1980-01-02
 # volume2: 1980-01-01 1980-01-02
 
 ## Check that prune-age is honored correctly
 
 echo "| Create third backup"
-RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --text got/5.txt
+RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --backup --text got/5.txt --html got/5.html
 # volume1:            1980-01-02 1980-01-03
 # volume2: 1980-01-01 1980-01-02 1980-01-03
 RSBACKUP_TODAY=1980-01-03 s ${RSBACKUP} --prune
@@ -91,10 +97,12 @@ compare volume2 store1/host1/volume2/1980-01-02
 compare volume1 store1/host1/volume1/1980-01-03
 compare volume2 store1/host1/volume2/1980-01-03
 sed < got/5.txt > got/5sed.txt "s,${PWD},<SRCDIR>,g"
+sed < got/5.html > got/5sed.html "s,${PWD},<SRCDIR>,g"
 compare ${srcdir:-.}/expect/5.txt got/5sed.txt
+compare ${srcdir:-.}/expect/5.html got/5sed.html
 
 echo "| Prune affecting unselected volume"
-RUN=prune2 RSBACKUP_TODAY=1980-01-04 s ${RSBACKUP} --prune --text got/6.txt host1:volume1
+RUN=prune2 RSBACKUP_TODAY=1980-01-04 s ${RSBACKUP} --prune --text got/6.txt --html got/6.html host1:volume1
 absent store1/host1/volume1/1980-01-01
 absent prune2-dev-pre.ran
 absent prune2-dev-post.ran
@@ -106,10 +114,12 @@ compare volume2 store1/host1/volume2/1980-01-02
 compare volume1 store1/host1/volume1/1980-01-03
 compare volume2 store1/host1/volume2/1980-01-03
 sed < got/6.txt > got/6sed.txt "s,${PWD},<SRCDIR>,g"
+sed < got/6.html > got/6sed.html "s,${PWD},<SRCDIR>,g"
 compare ${srcdir:-.}/expect/6.txt got/6sed.txt
+compare ${srcdir:-.}/expect/6.html got/6sed.html
 
 echo "| Prune affecting volume2"
-RUN=prune3 RSBACKUP_TODAY=1980-01-04 s ${RSBACKUP} --prune --text got/7.txt host1:volume2
+RUN=prune3 RSBACKUP_TODAY=1980-01-04 s ${RSBACKUP} --prune --text got/7.txt --html got/7.html host1:volume2
 absent store1/host1/volume1/1980-01-01
 absent store1/host1/volume2/1980-01-01
 exists prune3-dev-pre.ran
@@ -121,6 +131,8 @@ compare volume2 store1/host1/volume2/1980-01-02
 compare volume1 store1/host1/volume1/1980-01-03
 compare volume2 store1/host1/volume2/1980-01-03
 sed < got/7.txt > got/7sed.txt "s,${PWD},<SRCDIR>,g"
+sed < got/7.html > got/7sed.html "s,${PWD},<SRCDIR>,g"
 compare ${srcdir:-.}/expect/7.txt got/7sed.txt
+compare ${srcdir:-.}/expect/7.html got/7sed.html
 
 cleanup
index 32bf521..c3247f4 100755 (executable)
@@ -19,7 +19,7 @@ set -e
 setup
 
 echo "| Create backup"
-RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/8.txt
+RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/8.txt --html got/8.html
 # volume1: 1980-01-01
 # volume2: 1980-01-01
 exists logs/1980-01-01-device1-host1-volume1.log
@@ -31,13 +31,14 @@ exists store1/host1/volume2/1980-01-01
 exists store2/host1/volume1/1980-01-01
 exists store2/host1/volume2/1980-01-01
 compare ${srcdir:-.}/expect/8.txt got/8.txt
+compare ${srcdir:-.}/expect/8.html got/8.html
 
 echo "| Edit config"
 sed < config > config.new 's/^device device2//'
 mv config.new config
 
 echo "| --dry-run should do nothing"
-RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --retire-device --dry-run --text got/9.txt device2
+RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --retire-device --dry-run --text got/9.txt --html got/9.html device2
 exists logs/1980-01-01-device1-host1-volume1.log
 exists logs/1980-01-01-device1-host1-volume2.log
 exists logs/1980-01-01-device2-host1-volume1.log
@@ -47,9 +48,10 @@ exists store1/host1/volume2/1980-01-01
 exists store2/host1/volume1/1980-01-01
 exists store2/host1/volume2/1980-01-01
 compare ${srcdir:-.}/expect/9.txt got/9.txt
+compare ${srcdir:-.}/expect/9.html got/9.html
 
 echo "| Retire device2"
-RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --retire-device --text got/10.txt device2
+RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --retire-device --text got/10.txt --html got/10.html device2
 exists logs/1980-01-01-device1-host1-volume1.log
 exists logs/1980-01-01-device1-host1-volume2.log
 absent logs/1980-01-01-device2-host1-volume1.log
@@ -59,5 +61,6 @@ exists store1/host1/volume2/1980-01-01
 exists store2/host1/volume1/1980-01-01
 exists store2/host1/volume2/1980-01-01
 compare ${srcdir:-.}/expect/10.txt got/10.txt
+compare ${srcdir:-.}/expect/10.html got/10.html
 
 cleanup
index 513d3f4..ef4d892 100755 (executable)
@@ -19,7 +19,7 @@ set -e
 setup
 
 echo "| Create backup"
-RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/11.txt
+RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --text got/11.txt --html got/11.html
 # volume1: 1980-01-01
 # volume2: 1980-01-01
 exists logs/1980-01-01-device1-host1-volume1.log
@@ -31,13 +31,14 @@ exists store1/host1/volume2/1980-01-01
 exists store2/host1/volume1/1980-01-01
 exists store2/host1/volume1/1980-01-01
 compare ${srcdir:-.}/expect/11.txt got/11.txt
+compare ${srcdir:-.}/expect/11.html got/11.html
 
 echo "| Edit config"
 sed < config > config.new 's/^ *volume volume2.*//;s/^ *min-backups 2//'
 mv config.new config
 
 echo "| --dry-run should do nothing"
-RSBACKUP_TODAY=1980-01-01 RUN=dryrun s ${RSBACKUP} --retire --dry-run --text got/12.txt host1:volume2
+RSBACKUP_TODAY=1980-01-01 RUN=dryrun s ${RSBACKUP} --retire --dry-run --text got/12.txt --html got/12.html host1:volume2
 exists dryrun-dev-pre.ran
 exists dryrun-dev-post.ran
 absent dryrun-dev-pre.acted
@@ -51,9 +52,10 @@ exists store1/host1/volume2/1980-01-01
 exists store2/host1/volume1/1980-01-01
 exists store2/host1/volume1/1980-01-01
 compare ${srcdir:-.}/expect/12.txt got/12.txt
+compare ${srcdir:-.}/expect/12.html got/12.html
 
 echo "| Retire volume2"
-RSBACKUP_TODAY=1980-01-01 RUN=retire s ${RSBACKUP} --verbose --retire --text got/13.txt host1:volume2
+RSBACKUP_TODAY=1980-01-01 RUN=retire s ${RSBACKUP} --verbose --retire --text got/13.txt --html got/13.html host1:volume2
 exists retire-dev-pre.ran
 exists retire-dev-post.ran
 exists retire-dev-pre.acted
@@ -67,5 +69,6 @@ absent store1/host1/volume2
 exists store2/host1/volume1/1980-01-01
 absent store2/host1/volume2
 compare ${srcdir:-.}/expect/13.txt got/13.txt
+compare ${srcdir:-.}/expect/13.html got/13.html
 
 cleanup
index 48e92ad..f33c63c 100755 (executable)
@@ -21,7 +21,7 @@ setup
 mv store1 store3
 
 echo "| Create backup with overridden store"
-RUN=store RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --store `pwd`/store3 --text got/14.txt
+RUN=store RSBACKUP_TODAY=1980-01-01 s ${RSBACKUP} --backup --store `pwd`/store3 --text got/14.txt --html got/14.html
 exists store-pre.ran
 exists store-post.ran
 compare volume1 store3/host1/volume1/1980-01-01
@@ -31,5 +31,6 @@ absent store1/host1/volume2
 absent store2/host1/volume1
 absent store2/host1/volume2
 compare ${srcdir:-.}/expect/14.txt got/14.txt
+compare ${srcdir:-.}/expect/14.html got/14.html
 
 cleanup