From: "Simon.Cathebras" <Simon.Cathebras@ensimag.imag.fr>
To: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
Cc: git@vger.kernel.org, charles.roussel@ensimag.imag.fr,
Guillaume.Sasdy@ensimag.imag.fr, Julien.Khayat@ensimag.imag.fr,
Simon.Perrat@ensimag.imag.fr, peff@peff.net, gitster@pobox.com,
Charles Roussel <charles.roussel@ensimag.fr>
Subject: Re: [PATCH 3/3] Tests file for git-remote-mediawiki
Date: Fri, 08 Jun 2012 10:04:25 +0200 [thread overview]
Message-ID: <4FD1B209.702@ensimag.imag.fr> (raw)
In-Reply-To: <vpqobow8a9l.fsf@bauges.imag.fr>
On 06/06/2012 22:18, Matthieu Moy wrote:
> Simon Cathebras<simon.cathebras@ensimag.imag.fr> writes:
>
>> From: Charles Roussel<charles.roussel@ensimag.fr>
>>
>> Those scripts test the functions of git-remote-mediawiki.
>> t9360: test cases for git clone. Including tests of cloning just a category, just a precise set of page and a classical use of clone on the whole wiki.
> Avoid long lines in code and commit messages (80 columns max)
Understood, it will be corrected in the next patch.
>
>> In addition, this file provide now some fonction du manipulate sections on wiki.
> s/du/to/
>
>> t9361: test cases for git pull (add page, edit page, delete page) and git push (add file, edit file, delete file).
> When commis messages start looking like an enumeration, it usually means
> that either you read the GNU recommandation for ChangeLogs too much, or
> that you should split your commit (not mandatory here I think, but short
> patches are easier to review).
Do you mean that we should split the third patch into two patches ? For
instance::
Patch 3/4: tests for git pull
Patch 4/4: tests for git push
>
>> +# tests for git-remote-mediawiki
>> +
>> +test_description='Test the Git Mediawiki remote helper: git clone'
> Why do you need a comment if you have the test_description right below?
Deleted.
>
>> +if [ ! -f /$GIT_BUILD_DIR/git-remote-mediawiki ];
> Why / in front of $GIT_BUILD_DIR/ ?
Good point, we didn't noticed it ...
>> + test_expect_code 0 ls mw_dir | wc -l | grep 1&&
>> + test_expect_code 0 test -e mw_dir/Main_Page.mw&&
> Why "test_expect_code 0"? You already have&& right?
Yes, we haven't realised it wasn't necessary.
We have corrected other errors like this one in our tests.
> Doesn't a directory containing 10 files pass the tests?
>
> You probably want a helper function test_contains_N_files<dir> <N> that
> does test `ls mw_dir | wc -l` -eq 1 as you did below, but may give a
> diagnosis when the test fails.
Done, and replace within the existing code.
>> +test_expect_success 'git clone only create Main_Page.mw with a wiki with no other pages ' '
>> + wiki_reset&&
>> + wiki_editpage foo "this page must be delete before the clone" false&&
> s/delete/deleted/
>> + git_diff_directories mw_dir ref_page&&
> functions in tests are usually prefixed with test_ instead.
Fair enough. We have changed the function's name. Should we add such
prefix on functions like wiki_reset or wiki_delete page ?
>> +# clone a wiki after a page has been added then edited once
>> +# check that the content is correct
> It's not sufficient. You should check also that the history is correct.
>
Test is now correct.
Thanks for the advices ;).
--
CATHEBRAS Simon
2A-ENSIMAG
Filière Ingéniérie des Systèmes d'Information
Membre Bug-Buster
next prev parent reply other threads:[~2012-06-08 8:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 13:20 [Git-MediaWiki] Test environment for Git-MediaWiki Simon.Cathebras
2012-06-05 13:25 ` [PATCH 1/3] Script to install, delete and clear a MediaWiki Simon Cathebras
2012-06-05 13:25 ` [PATCH 2/3] Test environment of git-remote-mw Simon Cathebras
2012-06-05 13:25 ` [PATCH 3/3] Tests file for git-remote-mediawiki Simon Cathebras
2012-06-06 20:18 ` Matthieu Moy
2012-06-08 8:04 ` Simon.Cathebras [this message]
2012-06-08 8:57 ` Matthieu Moy
2012-06-08 9:04 ` Simon Perrat
2012-06-08 9:08 ` Matthieu Moy
2012-06-05 16:48 ` [PATCH 1/3] Script to install, delete and clear a MediaWiki Junio C Hamano
2012-06-06 13:49 ` Simon.Cathebras
-- strict thread matches above, loose matches on Subject: below --
2012-05-30 16:30 [PATCH/RFC]Test environment for Git-MediaWiki Simon.Cathebras
2012-05-30 17:04 ` [PATCH 1/3] Script to install, delete and clear a MediaWiki Simon Cathebras
2012-05-30 17:04 ` [PATCH 3/3] Tests file for git-remote-mediawiki Simon Cathebras
2012-06-01 10:41 ` [PATCH 1/3] Script to install, delete and clear a MediaWiki Guillaume Sasdy
2012-06-01 10:41 ` [PATCH 3/3] Tests file for git-remote-mediawiki Guillaume Sasdy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FD1B209.702@ensimag.imag.fr \
--to=simon.cathebras@ensimag.imag.fr \
--cc=Guillaume.Sasdy@ensimag.imag.fr \
--cc=Julien.Khayat@ensimag.imag.fr \
--cc=Matthieu.Moy@grenoble-inp.fr \
--cc=Simon.Perrat@ensimag.imag.fr \
--cc=charles.roussel@ensimag.fr \
--cc=charles.roussel@ensimag.imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.