From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Simon Cathebras <simon.cathebras@ensimag.imag.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: Wed, 06 Jun 2012 22:18:14 +0200 [thread overview]
Message-ID: <vpqobow8a9l.fsf@bauges.imag.fr> (raw)
In-Reply-To: <1338902756-4162-3-git-send-email-simon.cathebras@ensimag.imag.fr> (Simon Cathebras's message of "Tue, 5 Jun 2012 15:25:56 +0200")
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)
> 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).
> +# 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?
> +if [ ! -f /$GIT_BUILD_DIR/git-remote-mediawiki ];
Why / in front of $GIT_BUILD_DIR/ ?
> + 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?
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.
> +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.
> +# 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.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2012-06-06 20:18 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 [this message]
2012-06-08 8:04 ` Simon.Cathebras
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=vpqobow8a9l.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=Guillaume.Sasdy@ensimag.imag.fr \
--cc=Julien.Khayat@ensimag.imag.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 \
--cc=simon.cathebras@ensimag.imag.fr \
/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.