Bug 365444 - Allow to write tests with CLI syntax
Summary: Allow to write tests with CLI syntax
Status: RESOLVED FIXED
Alias: None
Product: JGit
Classification: Technology
Component: JGit (show other bugs)
Version: 1.2   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0-M2   Edit
Assignee: Tomasz Zarna CLA
QA Contact:
URL: https://git.eclipse.org/r/#/c/5408/
Whiteboard:
Keywords: noteworthy, test
Depends on:
Blocks: 365535
  Show dependency tree
 
Reported: 2011-12-02 10:00 EST by Tomasz Zarna CLA
Modified: 2012-05-02 05:50 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (13.36 KB, application/octet-stream)
2011-12-02 10:03 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Zarna CLA 2011-12-02 10:00:00 EST
It would be cool if anyone knowing CGit had a way to put up a test case without knowing JGit API.

JGit already provides a CLI in org.eclipse.jgit.pgm, once it is completely backed with JGit API (bug 365439), being able to write tests like this, shouldn't be hard:

@Test
public void testList() throws Exception {
	String result = execute("git branch -v");
	assertEquals("* master 9c58deb Initial commit", result);
}

This would not only make writing tests easier but also increase test coverage on JGit API.
Comment 1 Tomasz Zarna CLA 2011-12-02 10:03:06 EST
A initial patch has been pushed as http://egit.eclipse.org/r/4720. Comments are welcome.
Comment 2 Tomasz Zarna CLA 2011-12-02 10:03:52 EST
Created attachment 207846 [details]
mylyn/context/zip
Comment 3 Tomasz Zarna CLA 2012-01-09 06:21:59 EST
Matthias, any chance someone will look at the fix in the nearest future? If there is anything you guys don't like about the patch please let me know and I'll amend it.

IMO this bug combined with bug 365439 could be a real booster for making the JGit API more robust.
Comment 4 Tomasz Zarna CLA 2012-03-22 09:04:28 EDT
Fixed with bf845c126d53f07de103e03b68ddb7f24014cee5
Comment 5 Chris Aniszczyk CLA 2012-03-22 19:35:30 EDT
For the purposes of documentation, I supervised and approved this change as a member of the Technology PMC.
Comment 6 Matthias Sohn CLA 2012-03-23 04:23:39 EDT
This change needs an approved CQ, hence I reverted this change as it was submitted by mistake and filed CQ 6358 and re-issued this contribution under https://git.eclipse.org/r/#/c/5408/
Comment 7 Tomasz Zarna CLA 2012-04-18 06:23:06 EDT
The CQ has been approved. Can we proceed with the contribution? The IP is clean now.
Comment 8 Tomasz Zarna CLA 2012-04-19 04:53:58 EDT
Merged as 9c5b31703f278c510bec64fa7a822713feaca6f2