[PATCH 3/3] Tests file for git-remote-mediawiki

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Charles Roussel <charles.roussel@xxxxxxxxxx>

This file (will) contains all tests for git-remote-mediawiki.
For now, we have one test of git-clone on a wiki with one page.

Signed-off-by: Simon Cathebras <simon.cathebras@xxxxxxxxxxxxxxx>
Signed-off-by: Charles Roussel <charles.roussel@xxxxxxxxxxxxxxx>
Signed-off-by: Julien Khayat <julien.khayat@xxxxxxxxxxxxxxx>
Signed-off-by: Simon Perrat <simon.perrat@xxxxxxxxxxxxxxx>
Signed-off-by: Guillaume Sasdy <guillaume.sasdy@xxxxxxxxx>
---
 t/t9360-git-mediawiki.sh | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100755 t/t9360-git-mediawiki.sh

diff --git a/t/t9360-git-mediawiki.sh b/t/t9360-git-mediawiki.sh
new file mode 100755
index 0000000..8de56c5
--- /dev/null
+++ b/t/t9360-git-mediawiki.sh
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# Copyright (C) 2012
+#     Charles Roussel <charles.roussel@xxxxxxxxxxxxxxx>
+#     Simon Cathebras <simon.cathebras@xxxxxxxxxxxxxxx>
+#     Julien Khayat <julien.khayat@xxxxxxxxxxxxxxx>
+#     Guillaume Sasdy <guillaume.sasdy@xxxxxxxxxxxxxxx>
+#     Simon Perrat <simon.perrat@xxxxxxxxxxxxxxx>
+#     Matthieu Moy <Matthieu.Moy@xxxxxxxxxxxxxxx>
+#
+# License: GPL v2 or later
+
+# tests for git-remote-mediawiki
+
+test_description='Test the Git Mediawiki remote helper'
+
+. ./test-gitmw-lib.sh
+. ./test-lib.sh
+
+if ! test_have_prereq PERL
+then
+	skip_all='skipping gateway git-mw tests, perl not available'
+	test_done
+fi
+
+if [ ! -f /$GIT_BUILD_DIR/git-remote-mediawiki ];
+then
+	skip_all='skipping gateway git-mw tests, no remote mediawiki for git found'
+	test_done
+fi
+
+if [ ! -d "$WIKI_DIR_INST/$WIKI_DIR_NAME" ] ;
+then
+	skip_all='skipping gateway git-mw tests, no mediawiki found'
+	test_done
+fi
+
+test_expect_success 'git clone works with page added' '
+	cmd_reset &&
+	wiki_editpage foo "hello_world" false &&
+	wiki_editpage bar "hi everybody !" false &&
+	git clone mediawiki::http://localhost/wiki mw_dir &&
+	wiki_getallpage ref_page &&
+	git_content mw_dir ref_page &&
+	wiki_delete_page foo &&
+	wiki_delete_page bar
+'
+
+test_done
-- 
1.7.10.2.552.gaa3bb87

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]