Re: [PATCH 3/6] Test file for git-remote-mediawiki clone

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

 





On 12/06/2012 23:34, konglu@xxxxxxxxxxxxxxx wrote:

Simon Cathebras <simon.cathebras@xxxxxxxxxxxxxxx> a écrit :

From: Guillaume Sasdy <guillaume.sasdy@xxxxxxxxxxxxxxx>

This patch provides some tests for the clone in use by
git-remote-mediawiki.

Signed-off-by: Simon Cathebras <simon.cathebras@xxxxxxxxxxxxxxx>
Signed-off-by: Simon Perrat <simon.perrat@xxxxxxxxxxxxxxx>
Signed-off-by: Guillaume Sasdy <guillaume.sasdy@xxxxxxxxxxxxxxx>
Signed-off-by: Charles Roussel <charles.roussel@xxxxxxxxxxxxxxx>
Signed-off-by: Julien Khayat <julien.khayat@xxxxxxxxxxxxxxx>
Signed-off-by: Matthieu Moy <matthieu.moy@xxxxxxx>
---
contrib/mw-to-git/t/t9360-mw-to-git-clone.sh | 238 +++++++++++++++++++++++++++
 1 file changed, 238 insertions(+)
 create mode 100755 contrib/mw-to-git/t/t9360-mw-to-git-clone.sh

diff --git a/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh
new file mode 100755
index 0000000..07e1270
--- /dev/null
+++ b/contrib/mw-to-git/t/t9360-mw-to-git-clone.sh
@@ -0,0 +1,238 @@
+#!/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>
+#
+# License: GPL v2 or later
+
+
+test_description='Test the Git Mediawiki remote helper: git clone'
+
+. ./test-gitmw-lib.sh
+. $TEST_DIRECTORY/test-lib.sh
+
+
+test_check_precond
+
+
+test_expect_success 'Git clone creates the git log expected with one file' '
+    wiki_reset &&
+ wiki_editpage foo "this is not important" false -c cat -s "this must be the same" && + git clone mediawiki::http://'"$SERVER_ADDR:$PORT/$WIKI_DIR_NAME"' mw_dir_1 &&
+    (cd mw_dir_1 &&
+    git log --format=%s HEAD^..HEAD > log.tmp ) &&
+    echo "this must be the same" > msg.tmp &&
+    diff -b mw_dir_1/log.tmp msg.tmp
+'

It's clearer to put it this way:

        git clone [...] &&
        (
                cd ... &&
                ....
        ) &&
        ....


Okay, we are modifiying it right now.

And, about style:
    "echo one >one" and not "echo one > one"



same.


Simon C.

--
CATHEBRAS Simon

2A-ENSIMAG

Filière Ingéniérie des Systèmes d'Information
Membre Bug-Buster

--
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]