Commits

shl...@6a489e09-e8c2-0310-a3fb-a128a961c0b2  committed 07b6966

Added the stop-on-error test.

  • Participants
  • Parent commits efdb4d5

Comments (0)

Files changed (7)

File installer/tests/stop-on-error/template/slides/Contents.pm

+package Contents;
+
+use strict;
+
+my $contents =
+{
+    'title' => "My Lecture Title",
+    'subs' =>
+    [
+        {
+            'url' => "one.html",
+            'title' => "One - Good",
+        },
+        {
+            'url' => "two.html",
+            'title' => "Error",
+        },
+        {
+            'url' => "three.html",
+            'title' => "Three - Good",
+        },
+    ],
+    'images' =>
+    [
+        'style.css',
+    ],
+};
+
+sub get_contents
+{
+    return $contents;
+}
+
+1;

File installer/tests/stop-on-error/template/slides/src/index.html.wml

+#include 'template.wml'
+
+<h1><font color="red">FILL IN</font></h1>

File installer/tests/stop-on-error/template/slides/src/one.html.wml

+#include 'template.wml'
+
+<h1><font color="red">FILL IN</font></h1>

File installer/tests/stop-on-error/template/slides/src/style.css

+a.nav:link { color: green }
+a.nav:visited { color: #FF1493 /* The DeepPink Colour */  }
+a.nav:active { color: blue }
+b.nav { color : Black}
+b.plain {color : Black}
+a:hover { background-color: yellow }
+body { background-color : #FFFFFF }
+a.contents:active { color: red }
+table.mycode { border-style : solid ; border-width : thin }
+td.mycode { width : 60em }
+table.mydemo { border-style : solid ; border-width : thin }
+td.mydemo { width : 60em }
+table.note { border-style : double ; border-width : 3em}
+h3.notbold { font-weight: normal }
+font.menupath { font-family: monospace }
+b.menupathcomponent { color: red }
+font.menupathseparator { color: green }
+tt.mycode { color : #8A2BE2 /* The BlueViolet Colour */ }
+tt { color : #8A2BE2 /* The BlueViolet Colour */ }
+li.notbold { padding-bottom : 15em }
+ul.contents { list-style-type : none ; padding-left : 2em }
+ul.contentsmain { list-style-type : none ; padding-left : 0em }
+ul.point { font-size : large }
+ol.point { font-size : large }
+table.frame { border-style : solid ; border-width : thin }
+/* The border1 class for border="1"-like tables */
+table.border1 
+{
+    border-style: solid; 
+    border-width: 1px; 
+    border-color: #eeeeee gray gray #eeeeee;
+}
+table.border1 > tbody > tr > th, table.border1 > tbody > tr > td 
+{
+    border-style : solid; 
+    border-width: 1px; 
+    border-color: gray #eeeeee #eeeeee gray;
+}
+/* Vim-HTML markup codes */
+.Comment { color: #0000ff; }
+.Constant { color: #ff00ff; }
+.Identifier { color: #008b8b; }
+.Special { color: #6a5acd; }
+.Statement { color: #a52a2a; font-weight: bold; }
+.PreProc { color: #a020f0; }
+.Type { color: #2e8b57; font-weight: bold; }

File installer/tests/stop-on-error/template/slides/src/three.html.wml

+#include 'template.wml'
+
+<h1><font color="red">FILL IN</font></h1>

File installer/tests/stop-on-error/template/slides/src/two.html.wml

+#include 'template.wml'
+
+<ol
+
+<li>
+Hello.
+</li>
+</ol>

File installer/tests/stop-on-error/test1.bash

+#!/bin/bash
+
+if [ -e in-out ] ; then
+    rm -fr in-out
+fi
+
+mkdir "in-out"
+
+cd "in-out"
+quadp setup slides --dest-dir=`pwd`/dest
+cp -rf ../template/slides/{Contents.pm,src} ./slides/
+if (cd slides && quadp render -a) > dump.txt 2>&1 ; then
+    echo "Error! quadp render -a did not stop on a broken input." 1>&2
+    exit 1
+fi
+if ! grep '^Quad-Pres Error:' dump.txt > /dev/null ; then
+    echo "Could not find an error in the error file" 1>&2
+    exit 1
+fi
+if [ -e dest/two.html ] ; then
+    echo "Error! The faulty file was found in the directory." 1>&2
+    exit 1
+fi
+
+echo "Stop on WML Error Test Passed"
+
+