From: Simon.Cathebras Date: Wed, 13 Jun 2012 07:20:33 GMT Subject: Re: [PATCH 3/6] Test file for git-remote-mediawiki clone Message-ID: <4FD83F41.3050101@ensimag.imag.fr> In-Reply-To: <20120612233448.Horde.yFmTWnwdC4BP17X4iOBVZrA@webmail.minatec.grenoble-inp.fr> On 12/06/2012 23:34, konglu@minatec.inpg.fr wrote: > > Simon Cathebras a écrit : > >> From: Guillaume Sasdy >> >> This patch provides some tests for the clone in use by >> git-remote-mediawiki. >> >> Signed-off-by: Simon Cathebras >> Signed-off-by: Simon Perrat >> Signed-off-by: Guillaume Sasdy >> Signed-off-by: Charles Roussel >> Signed-off-by: Julien Khayat >> Signed-off-by: Matthieu Moy >> --- >> 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 >> +# Simon Cathebras >> +# Julien Khayat >> +# Guillaume Sasdy >> +# Simon Perrat >> +# >> +# 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