nitiwiki: add tests for markdown extension config
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 21 May 2015 18:10:37 +0000 (14:10 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 21 May 2015 18:10:37 +0000 (14:10 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

12 files changed:
contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res [new file with mode: 0644]
contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/config.ini [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/contact.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/index.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/footer.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/header.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/menu.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3/templates/template.html [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3_nitiwiki_render.args [new file with mode: 0644]
contrib/nitiwiki/tests/wiki3_nitiwiki_status.args [new file with mode: 0644]

diff --git a/contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res b/contrib/nitiwiki/tests/res/wiki3_nitiwiki_render.res
new file mode 100644 (file)
index 0000000..adf25a7
--- /dev/null
@@ -0,0 +1 @@
+Render section out
diff --git a/contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res b/contrib/nitiwiki/tests/res/wiki3_nitiwiki_status.res
new file mode 100644 (file)
index 0000000..2451916
--- /dev/null
@@ -0,0 +1,12 @@
+nitiWiki
+name: wiki3
+config: wiki3/config.ini
+url: http://localhost/
+
+There is modified files:
+ + pages
+ + /pages/contact.mdwn
+ + /pages/index.mdwn
+ + /pages/other_page.mdwn
+
+Use nitiwiki --render to render modified files
diff --git a/contrib/nitiwiki/tests/wiki3/config.ini b/contrib/nitiwiki/tests/wiki3/config.ini
new file mode 100644 (file)
index 0000000..111f22b
--- /dev/null
@@ -0,0 +1,3 @@
+wiki.name=wiki3
+wiki.root_dir=wiki3
+wiki.md_ext=mdwn
diff --git a/contrib/nitiwiki/tests/wiki3/pages/contact.mdwn b/contrib/nitiwiki/tests/wiki3/pages/contact.mdwn
new file mode 100644 (file)
index 0000000..09f7129
--- /dev/null
@@ -0,0 +1 @@
+# Contact
diff --git a/contrib/nitiwiki/tests/wiki3/pages/index.mdwn b/contrib/nitiwiki/tests/wiki3/pages/index.mdwn
new file mode 100644 (file)
index 0000000..8b013d6
--- /dev/null
@@ -0,0 +1 @@
+# Index
diff --git a/contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn b/contrib/nitiwiki/tests/wiki3/pages/other_page.mdwn
new file mode 100644 (file)
index 0000000..a1ca7d9
--- /dev/null
@@ -0,0 +1 @@
+# Other Page
diff --git a/contrib/nitiwiki/tests/wiki3/templates/footer.html b/contrib/nitiwiki/tests/wiki3/templates/footer.html
new file mode 100644 (file)
index 0000000..7506b39
--- /dev/null
@@ -0,0 +1,10 @@
+<div class="row footer">
+       <div class="container-fluid">
+               <div class="well well-sm">
+                       <p><strong>%TITLE% &copy; %YEAR%</strong></p>
+                       <p class="text-muted"><em>last modification %GEN_TIME%</em></p>
+                       <p class="text-muted">Proudly powered by
+                               <a href="http://nitlanguage.org">nit</a>!</p>
+               </div>
+       </div>
+</div>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/header.html b/contrib/nitiwiki/tests/wiki3/templates/header.html
new file mode 100644 (file)
index 0000000..1cb06bf
--- /dev/null
@@ -0,0 +1,9 @@
+<div class="container-fluid header">
+       <div class="container">
+               <div class="header">
+                       <a href="http://uqam.ca"><img src="%ROOT_URL%/%LOGO%" alt="logo" /></a>
+                       <h2>%SUBTITLE%</h2>
+                       <h1>%TITLE%</h1>
+               </div>
+       </div>
+</div>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/menu.html b/contrib/nitiwiki/tests/wiki3/templates/menu.html
new file mode 100644 (file)
index 0000000..1ff832e
--- /dev/null
@@ -0,0 +1,20 @@
+<nav class="menu" role="navigation">
+       <div class="container">
+               <!-- Brand and toggle get grouped for better mobile display -->
+               <div class="navbar-header">
+                       <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+                               <span class="sr-only">Toggle navigation</span>
+                               <span class="icon-bar"></span>
+                               <span class="icon-bar"></span>
+                               <span class="icon-bar"></span>
+                       </button>
+                       <a class="navbar-brand" href="%ROOT_URL%index.html">%TITLE%</a>
+               </div>
+               <!-- Collect the nav links, forms, and other content for toggling -->
+               <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+                       <ul class="nav navbar-nav">
+                       %MENUS%
+                       </ul>
+               </div><!-- /.navbar-collapse -->
+       </div>
+</nav>
diff --git a/contrib/nitiwiki/tests/wiki3/templates/template.html b/contrib/nitiwiki/tests/wiki3/templates/template.html
new file mode 100644 (file)
index 0000000..6b3b126
--- /dev/null
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html lang="en">
+       <head>
+               <meta charset="utf-8">
+               <meta http-equiv="X-UA-Compatible" content="IE=edge">
+               <meta name="viewport" content="width=device-width, initial-scale=1">
+               <title>%TITLE%</title>
+
+               <link href="%ROOT_URL%/assets/vendors/bootstrap/bootstrap-3.2.0-dist/css/bootstrap.min.css" rel="stylesheet">
+               <link href="%ROOT_URL%/assets/css/main.css" rel="stylesheet">
+
+               <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+               <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+               <!--[if lt IE 9]>
+               <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
+               <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
+               <![endif]-->
+       </head>
+       <body>
+               %HEADER%
+               %TOP_MENU%
+               <div class="container">
+                       <div class="row">
+                               %BODY%
+                       </div>
+                       %FOOTER%
+               </div>
+
+               <script src="%ROOT_URL%/vendors/jquery/jquery-1.11.1.min.js"></script>
+               <script src="%ROOT_URL%/vendors/bootstrap/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
+       </body>
+</html>
diff --git a/contrib/nitiwiki/tests/wiki3_nitiwiki_render.args b/contrib/nitiwiki/tests/wiki3_nitiwiki_render.args
new file mode 100644 (file)
index 0000000..75ceb1c
--- /dev/null
@@ -0,0 +1 @@
+../bin/nitiwiki --config wiki3/config.ini --clean --render -v
diff --git a/contrib/nitiwiki/tests/wiki3_nitiwiki_status.args b/contrib/nitiwiki/tests/wiki3_nitiwiki_status.args
new file mode 100644 (file)
index 0000000..c148644
--- /dev/null
@@ -0,0 +1 @@
+../bin/nitiwiki --config wiki3/config.ini --clean --status