[junit] 01/37: Initial version.

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Tue Oct 24 22:17:00 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository junit.

commit fc16abf728ca30c5c7882ab737f5845b2b909b4f
Author: Michael Koch <konqueror at gmx.de>
Date:   Wed Apr 13 22:16:53 2005 +0000

    Initial version.
---
 debian/AboutDialog.java.diff |  12 +
 debian/README.debian         |  20 ++
 debian/TestRunner.java       | 541 +++++++++++++++++++++++++++++++++++++++++++
 debian/changelog             | 118 ++++++++++
 debian/compat                |   1 +
 debian/control               |  22 ++
 debian/copyright             | 225 ++++++++++++++++++
 debian/dirs                  |   2 +
 debian/junit-doc.docs        |   4 +
 debian/junit-doc.postinst    |   9 +
 debian/junit-doc.prerm       |   6 +
 debian/junit.1               |  32 +++
 debian/junit.files           |   2 +
 debian/junit.links           |   4 +
 debian/junit.postinst        |   3 +
 debian/junit.prerm           |   6 +
 debian/junit.sh              |  56 +++++
 debian/rules                 |  78 +++++++
 debian/watch                 |   2 +
 19 files changed, 1143 insertions(+)

diff --git a/debian/AboutDialog.java.diff b/debian/AboutDialog.java.diff
new file mode 100644
index 0000000..f80c248
--- /dev/null
+++ b/debian/AboutDialog.java.diff
@@ -0,0 +1,12 @@
+diff -uNr src.orig/junit/awtui/AboutDialog.java src/junit/awtui/AboutDialog.java
+--- src.orig/junit/awtui/AboutDialog.java	2003-09-12 07:52:49.000000000 +0900
++++ src/junit/awtui/AboutDialog.java	2003-09-12 07:53:26.000000000 +0900
+@@ -5,7 +5,7 @@
+ 
+ import junit.runner.Version;
+ 
+-class AboutDialog extends Dialog {
++public class AboutDialog extends Dialog {
+ 	public AboutDialog(Frame parent) {
+ 		super(parent);
+ 		
diff --git a/debian/README.debian b/debian/README.debian
new file mode 100644
index 0000000..652e05e
--- /dev/null
+++ b/debian/README.debian
@@ -0,0 +1,20 @@
+JUnit for Debian
+----------------------
+
+* debian specific parts (debian/*) are distributed under GPL.
+* junit is installed to /usr/share/java/junit.jar.
+* for excute 
+  java -classpath /usr/share/java/junit.jar:. junit.textui.TestRunner
+  java -classpath /usr/share/java/junit.jar:. junit.swingui.TestRunner
+  java -classpath /usr/share/java/junit.jar:. junit.ui.LoadingTestRunner
+
+* /usr/bin/junit script provid same as above function with following options:
+
+   -text:  run junit.textui.TestRunner
+   -swing: run junit.ui.TestRunner
+   -awt:  run junit.swingui.TestRunner
+
+* junit.swingui.TestRunner doesn't use with Kaffe because it doesn't support 
+  swing.
+
+Takashi Okamoto <tora at debian.org>, Thu, 28 Jun 2001 18:47:32 +0900
diff --git a/debian/TestRunner.java b/debian/TestRunner.java
new file mode 100644
index 0000000..bebfed2
--- /dev/null
+++ b/debian/TestRunner.java
@@ -0,0 +1,541 @@
+package junit.swingui;
+
+import java.awt.*;
+import java.awt.event.*;
+import junit.awtui.*;
+import java.awt.image.ImageProducer;
+import java.util.Vector;
+
+import junit.framework.*;
+import junit.runner.*;
+
+
+/**
+ * An AWT based user interface to run tests.
+ * Enter the name of a class which either provides a static
+ * suite method or is a subclass of TestCase.
+ * <pre>
+ * Synopsis: java junit.awtui.TestRunner [-noloading] [TestCase]
+ * </pre>
+ * TestRunner takes as an optional argument the name of the testcase class to be run.
+ */
+ public class TestRunner extends BaseTestRunner {
+	protected Frame fFrame;
+	protected Vector fExceptions;
+	protected Vector fFailedTests;
+	protected Thread fRunner;
+	protected TestResult fTestResult;
+
+	protected TextArea fTraceArea;
+	protected TextField fSuiteField;
+	protected Button fRun;
+	protected ProgressBar fProgressIndicator;
+	protected List fFailureList;
+	protected Logo fLogo;
+	protected Label fNumberOfErrors;
+	protected Label fNumberOfFailures;
+	protected Label fNumberOfRuns;
+	protected Button fQuitButton;
+	protected Button fRerunButton;
+	protected TextField fStatusLine;
+	protected Checkbox fUseLoadingRunner;
+
+	protected static final Font PLAIN_FONT= new Font("dialog", Font.PLAIN, 12);
+	private static final int GAP= 4;
+
+	public TestRunner() {
+	}
+
+	private void about() {
+		AboutDialog about= new AboutDialog(fFrame);
+		about.setModal(true);
+		about.setLocation(300, 300);
+		about.setVisible(true);
+	}
+
+	public void testStarted(String testName) {
+		showInfo("Running: "+testName);
+	}
+
+	public void testEnded(String testName) {
+		setLabelValue(fNumberOfRuns, fTestResult.runCount());
+		synchronized(this) {
+			fProgressIndicator.step(fTestResult.wasSuccessful());
+		}
+	}
+
+	public void testFailed(int status, Test test, Throwable t) {
+		switch (status) {
+			case TestRunListener.STATUS_ERROR:
+				fNumberOfErrors.setText(Integer.toString(fTestResult.errorCount()));
+				appendFailure("Error", test, t);
+				break;
+			case TestRunListener.STATUS_FAILURE:
+				fNumberOfFailures.setText(Integer.toString(fTestResult.failureCount()));
+				appendFailure("Failure", test, t);
+				break;
+		}
+	}
+
+	protected void addGrid(Panel p, Component co, int x, int y, int w, int fill, double wx, int anchor) {
+		GridBagConstraints c= new GridBagConstraints();
+		c.gridx= x; c.gridy= y;
+		c.gridwidth= w;
+		c.anchor= anchor;
+		c.weightx= wx;
+		c.fill= fill;
+		if (fill == GridBagConstraints.BOTH || fill == GridBagConstraints.VERTICAL)
+			c.weighty= 1.0;
+		c.insets= new Insets(y == 0 ? GAP : 0, x == 0 ? GAP : 0, GAP, GAP);
+		p.add(co, c);
+	}
+
+	private void appendFailure(String kind, Test test, Throwable t) {
+		kind+= ": " + test;
+		String msg= t.getMessage();
+		if (msg != null) {
+			kind+= ":" + truncate(msg);
+		}
+		fFailureList.add(kind);
+		fExceptions.addElement(t);
+		fFailedTests.addElement(test);
+		if (fFailureList.getItemCount() == 1) {
+			fFailureList.select(0);
+			failureSelected();
+		}
+	}
+	/**
+	 * Creates the JUnit menu. Clients override this
+	 * method to add additional menu items.
+	 */
+	protected Menu createJUnitMenu() {
+		Menu menu= new Menu("JUnit");
+		MenuItem mi= new MenuItem("About...");
+		mi.addActionListener(
+		    new ActionListener() {
+		        public void actionPerformed(ActionEvent event) {
+		            about();
+		        }
+		    }
+		);
+		menu.add(mi);
+
+		menu.addSeparator();
+		mi= new MenuItem("Exit");
+		mi.addActionListener(
+		    new ActionListener() {
+		        public void actionPerformed(ActionEvent event) {
+		            System.exit(0);
+		        }
+		    }
+		);
+		menu.add(mi);
+		return menu;
+	}
+
+	protected void createMenus(MenuBar mb) {
+		mb.add(createJUnitMenu());
+	}
+	protected TestResult createTestResult() {
+		return new TestResult();
+	}
+
+	protected Frame createUI(String suiteName) {
+		Frame frame= new Frame("JUnit");
+		Image icon= loadFrameIcon();
+		if (icon != null)
+			frame.setIconImage(icon);
+
+		frame.setLayout(new BorderLayout(0, 0));
+		frame.setBackground(SystemColor.control);
+		final Frame finalFrame= frame;
+
+		frame.addWindowListener(
+			new WindowAdapter() {
+				public void windowClosing(WindowEvent e) {
+					finalFrame.dispose();
+					System.exit(0);
+				}
+			}
+		);
+
+		MenuBar mb = new MenuBar();
+		createMenus(mb);
+		frame.setMenuBar(mb);
+
+		//---- first section
+		Label suiteLabel= new Label("Test class name:");
+
+		fSuiteField= new TextField(suiteName != null ? suiteName : "");
+		fSuiteField.selectAll();
+		fSuiteField.requestFocus();
+		fSuiteField.setFont(PLAIN_FONT);
+		fSuiteField.setColumns(40);
+		fSuiteField.addActionListener(
+			new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					runSuite();
+				}
+			}
+		);
+		fSuiteField.addTextListener(
+			new TextListener() {
+				public void textValueChanged(TextEvent e) {
+					fRun.setEnabled(fSuiteField.getText().length() > 0);
+					fStatusLine.setText("");
+				}
+			}
+		);
+		fRun= new Button("Run");
+		fRun.setEnabled(false);
+		fRun.addActionListener(
+			new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					runSuite();
+				}
+			}
+		);
+		boolean useLoader= useReloadingTestSuiteLoader();
+		fUseLoadingRunner= new Checkbox("Reload classes every run", useLoader);
+		if (inVAJava())
+			fUseLoadingRunner.setVisible(false);
+
+		//---- second section
+		fProgressIndicator= new ProgressBar();
+
+		//---- third section
+		fNumberOfErrors= new Label("0000", Label.RIGHT);
+		fNumberOfErrors.setText("0");
+		fNumberOfErrors.setFont(PLAIN_FONT);
+
+		fNumberOfFailures= new Label("0000", Label.RIGHT);
+		fNumberOfFailures.setText("0");
+		fNumberOfFailures.setFont(PLAIN_FONT);
+
+		fNumberOfRuns= new Label("0000", Label.RIGHT);
+		fNumberOfRuns.setText("0");
+		fNumberOfRuns.setFont(PLAIN_FONT);
+
+		Panel numbersPanel= createCounterPanel();
+
+		//---- fourth section
+		Label failureLabel= new Label("Errors and Failures:");
+
+		fFailureList= new List(5);
+		fFailureList.addItemListener(
+			new ItemListener() {
+				public void itemStateChanged(ItemEvent e) {
+					failureSelected();
+				}
+			}
+		);
+		fRerunButton= new Button("Run");
+		fRerunButton.setEnabled(false);
+		fRerunButton.addActionListener(
+			new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					rerun();
+				}
+			}
+		);
+
+		Panel failedPanel= new Panel(new GridLayout(0, 1, 0, 2));
+		failedPanel.add(fRerunButton);
+
+		fTraceArea= new TextArea();
+		fTraceArea.setRows(5);
+		fTraceArea.setColumns(60);
+
+		//---- fifth section
+		fStatusLine= new TextField();
+		fStatusLine.setFont(PLAIN_FONT);
+		fStatusLine.setEditable(false);
+		fStatusLine.setForeground(Color.red);
+
+		fQuitButton= new Button("Exit");
+		fQuitButton.addActionListener(
+			new ActionListener() {
+				public void actionPerformed(ActionEvent e) {
+					System.exit(0);
+				}
+			}
+		);
+
+		// ---------
+		fLogo= new Logo();
+
+		//---- overall layout
+		Panel panel= new Panel(new GridBagLayout());
+
+		addGrid(panel, suiteLabel,		 0, 0, 2, GridBagConstraints.HORIZONTAL, 	1.0, GridBagConstraints.WEST);
+
+		addGrid(panel, fSuiteField, 	 0, 1, 2, GridBagConstraints.HORIZONTAL, 	1.0, GridBagConstraints.WEST);
+		addGrid(panel, fRun, 			 2, 1, 1, GridBagConstraints.HORIZONTAL, 	0.0, GridBagConstraints.CENTER);
+		addGrid(panel, fUseLoadingRunner, 0, 2, 2, GridBagConstraints.NONE, 	1.0, GridBagConstraints.WEST);
+		addGrid(panel, fProgressIndicator, 0, 3, 2, GridBagConstraints.HORIZONTAL, 	1.0, GridBagConstraints.WEST);
+		addGrid(panel, fLogo, 			 2, 3, 1, GridBagConstraints.NONE, 			0.0, GridBagConstraints.NORTH);
+
+		addGrid(panel, numbersPanel,	 0, 4, 2, GridBagConstraints.NONE, 			0.0, GridBagConstraints.WEST);
+
+		addGrid(panel, failureLabel, 	 0, 5, 2, GridBagConstraints.HORIZONTAL, 	1.0, GridBagConstraints.WEST);
+		addGrid(panel, fFailureList, 	 0, 6, 2, GridBagConstraints.BOTH, 			1.0, GridBagConstraints.WEST);
+		addGrid(panel, failedPanel, 	 2, 6, 1, GridBagConstraints.HORIZONTAL, 	0.0, GridBagConstraints.CENTER);
+		addGrid(panel, fTraceArea, 	     0, 7, 2, GridBagConstraints.BOTH, 			1.0, GridBagConstraints.WEST);
+
+		addGrid(panel, fStatusLine, 	 0, 8, 2, GridBagConstraints.HORIZONTAL, 	1.0, GridBagConstraints.CENTER);
+		addGrid(panel, fQuitButton, 	 2, 8, 1, GridBagConstraints.HORIZONTAL, 	0.0, GridBagConstraints.CENTER);
+
+		frame.add(panel, BorderLayout.CENTER);
+		frame.pack();
+		return frame;
+	}
+
+	protected Panel createCounterPanel() {
+		Panel numbersPanel= new Panel(new GridBagLayout());
+		addToCounterPanel(
+			numbersPanel,
+			new Label("Runs:"),
+			0, 0, 1, 1, 0.0, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.NONE,
+          	new Insets(0, 0, 0, 0) 
+		);	
+		addToCounterPanel(
+			numbersPanel,
+			fNumberOfRuns, 
+          	1, 0, 1, 1, 0.33, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+          	new Insets(0, 8, 0, 40)
+		);
+		addToCounterPanel(
+			numbersPanel,
+			new Label("Errors:"),
+          	2, 0, 1, 1, 0.0, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.NONE,
+          	new Insets(0, 8, 0, 0)
+		);
+		addToCounterPanel(
+			numbersPanel,
+			fNumberOfErrors,
+          	3, 0, 1, 1, 0.33, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+          	new Insets(0, 8, 0, 40)
+		);
+		addToCounterPanel(
+			numbersPanel,
+			new Label("Failures:"),
+          	4, 0, 1, 1, 0.0, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.NONE,
+          	new Insets(0, 8, 0, 0)
+		);	
+		addToCounterPanel(
+			numbersPanel,
+			fNumberOfFailures,
+          	5, 0, 1, 1, 0.33, 0.0,
+          	GridBagConstraints.CENTER, GridBagConstraints.HORIZONTAL,
+          	new Insets(0, 8, 0, 0) 
+		);
+		return numbersPanel;
+	}
+
+	private void addToCounterPanel(Panel counter, Component comp,
+	    	int gridx, int gridy, int gridwidth, int gridheight,
+			double weightx, double weighty,
+			int anchor, int fill,
+			Insets insets) {
+		
+		GridBagConstraints constraints= new GridBagConstraints();
+		constraints.gridx= gridx;
+		constraints.gridy= gridy;
+		constraints.gridwidth= gridwidth;
+		constraints.gridheight= gridheight;
+		constraints.weightx= weightx;
+		constraints.weighty= weighty;
+		constraints.anchor= anchor;
+		constraints.fill= fill;
+		constraints.insets= insets;
+		counter.add(comp, constraints);
+	}
+
+
+	public void failureSelected() {
+		fRerunButton.setEnabled(isErrorSelected());
+		showErrorTrace();
+	}
+
+	private boolean isErrorSelected() {
+		return fFailureList.getSelectedIndex() != -1;
+	}
+
+	private Image loadFrameIcon() {
+		Toolkit toolkit= Toolkit.getDefaultToolkit();
+		try {
+			java.net.URL url= BaseTestRunner.class.getResource("smalllogo.gif");
+			return toolkit.createImage((ImageProducer) url.getContent());
+		} catch (Exception ex) {
+		}
+		return null;
+	}
+
+	public Thread getRunner() {
+		return fRunner;
+	}
+
+	public static void main(String[] args) {
+		new TestRunner().start(args);
+	}
+
+	public static void run(Class test) {
+		String args[]= { test.getName() };
+		main(args);
+	}
+
+	public void rerun() {
+		int index= fFailureList.getSelectedIndex();
+		if (index == -1)
+			return;
+
+		Test test= (Test)fFailedTests.elementAt(index);
+		rerunTest(test);
+	}
+
+	private void rerunTest(Test test) {
+		if (!(test instanceof TestCase)) {
+			showInfo("Could not reload "+ test.toString());
+			return;
+		}
+		Test reloadedTest= null;
+		TestCase rerunTest= (TestCase)test;
+		try {
+			Class reloadedTestClass= getLoader().reload(test.getClass()); 
+			reloadedTest= TestSuite.createTest(reloadedTestClass, rerunTest.getName());
+		} catch(Exception e) {
+			showInfo("Could not reload "+ test.toString());
+			return;
+		}
+		TestResult result= new TestResult();
+		reloadedTest.run(result);
+
+		String message= reloadedTest.toString();
+		if(result.wasSuccessful())
+			showInfo(message+" was successful");
+		else if (result.errorCount() == 1)
+			showStatus(message+" had an error");
+		else
+			showStatus(message+" had a failure");
+	}
+
+	protected void reset() {
+		setLabelValue(fNumberOfErrors, 0);
+		setLabelValue(fNumberOfFailures, 0);
+		setLabelValue(fNumberOfRuns, 0);
+		fProgressIndicator.reset();
+		fRerunButton.setEnabled(false);
+		fFailureList.removeAll();
+		fExceptions= new Vector(10);
+		fFailedTests= new Vector(10);
+		fTraceArea.setText("");
+
+	}
+
+	protected void runFailed(String message) {
+		showStatus(message);
+		fRun.setLabel("Run");
+		fRunner= null;
+	}
+
+	synchronized public void runSuite() {
+		if (fRunner != null && fTestResult != null) {
+			fTestResult.stop();
+		} else {
+			setLoading(shouldReload());
+			fRun.setLabel("Stop");
+			showInfo("Initializing...");
+			reset();
+
+			showInfo("Load Test Case...");
+
+			final Test testSuite= getTest(fSuiteField.getText());
+			if (testSuite != null) {
+				fRunner= new Thread() {
+					public void run() {
+						fTestResult= createTestResult();
+						fTestResult.addListener(TestRunner.this);
+						fProgressIndicator.start(testSuite.countTestCases());
+						showInfo("Running...");
+
+						long startTime= System.currentTimeMillis();
+						testSuite.run(fTestResult);
+
+						if (fTestResult.shouldStop()) {
+							showStatus("Stopped");
+						} else {
+							long endTime= System.currentTimeMillis();
+							long runTime= endTime-startTime;
+							showInfo("Finished: " + elapsedTimeAsString(runTime) + " seconds");
+						}
+						fTestResult= null;
+						fRun.setLabel("Run");
+						fRunner= null;
+						System.gc();
+					}
+				};
+				fRunner.start();
+			}
+		}
+	}
+
+	private boolean shouldReload() {
+		return !inVAJava() && fUseLoadingRunner.getState();
+	}
+
+	private void setLabelValue(Label label, int value) {
+		label.setText(Integer.toString(value));
+		label.invalidate();
+		label.getParent().validate();
+
+	}
+
+	public void setSuiteName(String suite) {
+		fSuiteField.setText(suite);
+	}
+
+	private void showErrorTrace() {
+		int index= fFailureList.getSelectedIndex();
+		if (index == -1)
+			return;
+
+		Throwable t= (Throwable) fExceptions.elementAt(index);
+		fTraceArea.setText(getFilteredTrace(t));
+	}
+
+
+	private void showInfo(String message) {
+		fStatusLine.setFont(PLAIN_FONT);
+		fStatusLine.setForeground(Color.black);
+		fStatusLine.setText(message);
+	}
+
+	protected void clearStatus() {
+		showStatus("");
+	}
+
+	private void showStatus(String status) {
+		fStatusLine.setFont(PLAIN_FONT);
+		fStatusLine.setForeground(Color.red);
+		fStatusLine.setText(status);
+	}
+	/**
+	 * Starts the TestRunner
+	 */
+	public void start(String[] args) {
+		String suiteName= processArguments(args);
+		fFrame= createUI(suiteName);
+		fFrame.setLocation(200, 200);
+		fFrame.setVisible(true);
+
+		if (suiteName != null) {
+			setSuiteName(suiteName);
+			runSuite();
+		}
+	}
+}
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0f5a3e1
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,118 @@
+junit (3.8.1.1-4) unstable; urgency=low
+
+  * Build with -target 1.3 (Closes: #270662)
+  * Added symlinks for junit.jar from $ANT_HOME/lib directories
+    (Closes: #292271)
+  * debian/junit-doc.docs: Added 'doc' directory  and 'cpl-v10.html'
+    (Closes: #267995)
+  * Introduced debian/compat with compat level 4
+  * Cleaned up debian/rules
+  * Added debian/watch
+
+ -- Michael Koch <konqueror at gmx.de>  Wed, 13 Apr 2005 21:05:02 +0000
+
+junit (3.8.1.1-3) unstable; urgency=low
+
+  * Build-Depend on gjdoc >= 0.7.2-2 (Closes: #297664)
+  * Fixed junit manpage
+  * Updated Standards-Version to 3.6.1 (no changes needed)
+  * Added myself to Uploaders
+
+ -- Michael Koch <konqueror at gmx.de>  Mon, 14 Mar 2005 16:14:33 +0000
+
+junit (3.8.1.1-2) unstable; urgency=low
+
+  * add java api document.(closes: #216706)
+  * fixed links in README.html (closes: #188959)
+
+ -- Takashi Okamoto <tora at debian.org>  Sun, 25 Jul 2004 14:12:39 +0900
+
+junit (3.8.1.1-1) unstable; urgency=low
+
+  * same as 3.8.1-5. This release just fix junit_3.8.1.orig.tar.gz
+    is in contrib. (closes: #250731)
+
+ -- Takashi Okamoto <tora at debian.org>  Sun, 27 Jun 2004 23:35:56 +0900
+
+junit (3.8.1-5) unstable; urgency=low
+
+  * add fastjar for build-depend. (closes: #213757)
+
+ -- Takashi Okamoto <tora at debian.org>  Fri,  3 Oct 2003 01:08:59 +0900
+
+junit (3.8.1-4) unstable; urgency=low
+
+  * remove swing dependency and in main now (closes: #135276).
+  * fixed type (cloese: #188959). This bug was closed since 3.8.1.
+  * javadoc is removed because gjdoc didn't work for me. 
+    I'll fix it later.
+
+ -- Takashi Okamoto <tora at debian.org>  Sat, 13 Sep 2003 09:08:32 +0900
+
+junit (3.8.1-3) unstable; urgency=low
+
+  * add java-virtual-machine for depend. (closes: #187031)
+
+ -- Takashi Okamoto <tora at debian.org>  Wed,  2 Apr 2003 08:07:15 +0900
+
+junit (3.8.1-2) unstable; urgency=low
+
+  * remove TestCase option with -swing and -awt (closes: #139180)
+
+ -- Takashi Okamoto <tora at debian.org>  Sun, 29 Dec 2002 10:11:23 +0900
+
+junit (3.8.1-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Takashi Okamoto <tora at debian.org>  Sun, 15 Sep 2002 20:25:28 +0900
+
+junit (3.8-1) unstable; urgency=low
+
+  * New upstream release
+  * license change IBM Public License into Common Public License.
+
+ -- Takashi Okamoto <tora at debian.org>  Sun,  1 Sep 2002 20:01:38 +0900
+
+junit (3.7-6) unstable; urgency=low
+
+  * add j2sdk1.3, java-virtual-machine-dummy, java-virtual-machine 
+    at depends field.
+
+ -- Takashi Okamoto <tora at debian.org>  Thu,  8 Aug 2002 08:06:18 +0900
+
+junit (3.7-5) unstable; urgency=low
+
+  * swing and awt test runnter work without arguments.(Closes #139180)
+  * change denpend java-vertual-machine to java2-runtime and j2re1.3.
+
+ -- Takashi Okamoto <tora at debian.org>  Thu, 21 Mar 2002 02:12:25 +0900
+
+junit (3.7-4) unstable; urgency=low
+
+  * move README.html to junit-doc package. (Closes: #119180) 
+
+ -- Takashi Okamoto <tora at debian.org>  Mon, 12 Nov 2001 20:50:57 +0900
+
+junit (3.7-3) unstable; urgency=low
+
+  * divide into junit and junit-doc because documentation is too big.
+  * move to new Java policy.(add change version to jar and make symlink)
+
+ -- Takashi Okamoto <tora at debian.org>  Thu,  4 Oct 2001 22:42:02 +0900
+
+junit (3.7-2) unstable; urgency=low
+
+  * junit script can't work correctly.(Closes: #106984)
+
+ -- Takashi Okamoto <tora at debian.org>  Mon, 30 Jul 2001 10:31:27 +0900
+
+junit (3.7-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Takashi Okamoto <tora at debian.org>  Thu, 28 Jun 2001 18:47:32 +0900
+
+Local variables:
+mode: debian-changelog
+End:
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..27b2e2c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,22 @@
+Source: junit
+Section: devel
+Priority: optional
+Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
+Uploaders: Takashi Okamoto <tora at debian.org>, Michael Koch <konqueror at gmx.de>
+Build-Depends-Indep: debhelper (>= 4.1), kaffe (>= 1.1.1), jikes (>= 1:1.18-6), fastjar (>= 3.3.2), gjdoc (>= 0.7.2-2)
+Standards-Version: 3.6.1
+
+Package: junit
+Architecture: all
+Depends: kaffe | gij (>= 3.3) | java1-runtime | java2-runtime
+Description: Automated testing framework for Java
+ JUnit is a simple framework for writing and running automated tests. 
+ As a political gesture, it celebrates programmers testing their own 
+ software.
+
+Package: junit-doc
+Architecture: all
+Suggests: junit
+Description: Document for JUnit
+ This package provide documents and examples for JUnit which is a simple 
+ framework for writing and running automated tests. 
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..16ece9b
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,225 @@
+This package was debianized by Takashi Okamoto tora at debian.org on
+Thu, 28 Jun 2001 18:47:32 +0900.
+
+It was downloaded from http://www.junit.org/.
+
+Copyright:
+                         Common Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC
+LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
+CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation
+    distributed under this Agreement, and
+    b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are
+    distributed by that particular Contributor. A Contribution 'originates'
+    from a Contributor if it was added to the Program by such Contributor
+    itself or anyone acting on such Contributor's behalf. Contributions do not
+    include additions to the Program which: (i) are separate modules of
+    software distributed in conjunction with the Program under their own
+    license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents " mean patent claims licensable by a Contributor which are
+necessarily infringed by the use or sale of its Contribution alone or when
+combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this
+Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement,
+including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants
+    Recipient a non-exclusive, worldwide, royalty-free copyright license to
+    reproduce, prepare derivative works of, publicly display, publicly perform,
+    distribute and sublicense the Contribution of such Contributor, if any, and
+    such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants
+    Recipient a non-exclusive, worldwide, royalty-free patent license under
+    Licensed Patents to make, use, sell, offer to sell, import and otherwise
+    transfer the Contribution of such Contributor, if any, in source code and
+    object code form. This patent license shall apply to the combination of the
+    Contribution and the Program if, at the time the Contribution is added by
+    the Contributor, such addition of the Contribution causes such combination
+    to be covered by the Licensed Patents. The patent license shall not apply
+    to any other combinations which include the Contribution. No hardware per
+    se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to
+    its Contributions set forth herein, no assurances are provided by any
+    Contributor that the Program does not infringe the patent or other
+    intellectual property rights of any other entity. Each Contributor
+    disclaims any liability to Recipient for claims brought by any other entity
+    based on infringement of intellectual property rights or otherwise. As a
+    condition to exercising the rights and licenses granted hereunder, each
+    Recipient hereby assumes sole responsibility to secure any other
+    intellectual property rights needed, if any. For example, if a third party
+    patent license is required to allow Recipient to distribute the Program, it
+    is Recipient's responsibility to acquire that license before distributing
+    the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient
+    copyright rights in its Contribution, if any, to grant the copyright
+    license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under
+its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and
+    conditions, express and implied, including warranties or conditions of
+    title and non-infringement, and implied warranties or conditions of
+    merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for
+    damages, including direct, indirect, special, incidental and consequential
+    damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by
+    that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor,
+    and informs licensees how to obtain it in a reasonable manner on or through
+    a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+[DEL::DEL]
+
+[DEL::DEL]Contributors may not remove or alter any copyright notices contained
+within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if
+any, in a manner that reasonably allows subsequent Recipients to identify the
+originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with
+respect to end users, business partners and the like. While this license is
+intended to facilitate the commercial use of the Program, the Contributor who
+includes the Program in a commercial product offering should do so in a manner
+which does not create potential liability for other Contributors. Therefore, if
+a Contributor includes the Program in a commercial product offering, such
+Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any losses, damages
+and costs (collectively "Losses") arising from claims, lawsuits and other legal
+actions brought by a third party against the Indemnified Contributor to the
+extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may
+participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor. If that
+Commercial Contributor then makes performance claims, or offers warranties
+related to Product X, those performance claims and warranties are such
+Commercial Contributor's responsibility alone. Under this section, the
+Commercial Contributor would have to defend claims against the other
+Contributors related to those performance claims and warranties, and if a court
+requires any other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
+IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
+NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
+Recipient is solely responsible for determining the appropriateness of using
+and distributing the Program and assumes all risks associated with its exercise
+of rights under this Agreement, including but not limited to the risks and
+costs of program errors, compliance with applicable laws, damage to or loss of
+data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
+CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST
+PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
+WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS
+GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable
+law, it shall not affect the validity or enforceability of the remainder of the
+terms of this Agreement, and without further action by the parties hereto, such
+provision shall be reformed to the minimum extent necessary to make such
+provision valid and enforceable.
+
+If Recipient institutes patent litigation against a Contributor with respect to
+a patent applicable to software (including a cross-claim or counterclaim in a
+lawsuit), then any patent licenses granted by that Contributor to such
+Recipient under this Agreement shall terminate as of the date such litigation
+is filed. In addition, if Recipient institutes patent litigation against any
+entity (including a cross-claim or counterclaim in a lawsuit) alleging that the
+Program itself (excluding combinations of the Program with other software or
+hardware) infringes such Recipient's patent(s), then such Recipient's rights
+granted under Section 2(b) shall terminate as of the date such litigation is
+filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to
+comply with any of the material terms or conditions of this Agreement and does
+not cure such failure in a reasonable period of time after becoming aware of
+such noncompliance. If all Recipient's rights under this Agreement terminate,
+Recipient agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under this Agreement
+and any licenses granted by Recipient relating to the Program shall continue
+and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in
+order to avoid inconsistency the Agreement is copyrighted and may only be
+modified in the following manner. The Agreement Steward reserves the right to
+publish new versions (including revisions) of this Agreement from time to time.
+No one other than the Agreement Steward has the right to modify this Agreement.
+IBM is the initial Agreement Steward. IBM may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the
+intellectual property laws of the United States of America. No party to this
+Agreement will bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights to a jury trial
+in any resulting litigation.
+
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..e4bc73a
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/java
diff --git a/debian/junit-doc.docs b/debian/junit-doc.docs
new file mode 100644
index 0000000..2863815
--- /dev/null
+++ b/debian/junit-doc.docs
@@ -0,0 +1,4 @@
+cpl-v10.html
+doc
+javadoc
+README.html
diff --git a/debian/junit-doc.postinst b/debian/junit-doc.postinst
new file mode 100644
index 0000000..00089be
--- /dev/null
+++ b/debian/junit-doc.postinst
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ "$1" = "configure" ]; then
+  if [ -d /usr/doc -a ! -e /usr/doc/junit-doc -a -d /usr/share/doc/junit-doc ]; then
+    ln -sf /usr/share/doc/junit-doc /usr/doc/junit-doc
+  fi
+fi
+
+#DEBHELPER#
diff --git a/debian/junit-doc.prerm b/debian/junit-doc.prerm
new file mode 100644
index 0000000..214b4ad
--- /dev/null
+++ b/debian/junit-doc.prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/junit-doc ]; then
+  rm -f /usr/doc/junit-doc
+fi
+#DEBHELPER#
diff --git a/debian/junit.1 b/debian/junit.1
new file mode 100644
index 0000000..da5d01c
--- /dev/null
+++ b/debian/junit.1
@@ -0,0 +1,32 @@
+.TH junit 1
+.\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
+.\" other parms are allowed: see man(7), man(1)
+.SH NAME
+junit \- automated testing framework for Java
+.SH SYNOPSIS
+.B junit
+.I "[option] TestCaseName ..."
+.SH "DESCRIPTION"
+.B junit
+is a simple framework for writing and running automated tests. As a political gesture, it celebrates programmers testing their own software.
+.SH OPTIONS
+A summary of options are included below.
+.TP
+.B \TestCaseName
+TestCaseName is name of TestCase class.
+.TP
+.B \-help
+Show summary of options.
+.TP
+.B \-text
+using text user interface.
+.TP
+.B \-awt
+using awt user interface.
+.TP
+.B \-swing
+using swing user interface.
+
+.SH AUTHOR
+This manual page was written by Takashi Okamoto <tora at debian.org>,
+for the Debian GNU/Linux system (but may be used by others).
diff --git a/debian/junit.files b/debian/junit.files
new file mode 100644
index 0000000..a5301fa
--- /dev/null
+++ b/debian/junit.files
@@ -0,0 +1,2 @@
+usr/share/java/junit-3.8.1.jar
+usr/bin/junit
diff --git a/debian/junit.links b/debian/junit.links
new file mode 100644
index 0000000..f91c968
--- /dev/null
+++ b/debian/junit.links
@@ -0,0 +1,4 @@
+usr/share/java/junit-3.8.1.jar usr/share/java/junit.jar
+usr/share/java/junit.jar usr/share/ant/lib/junit.jar
+usr/share/java/junit.jar usr/share/ant1.6/lib/junit.jar
+
diff --git a/debian/junit.postinst b/debian/junit.postinst
new file mode 100644
index 0000000..a2c66fa
--- /dev/null
+++ b/debian/junit.postinst
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+#DEBHELPER#
diff --git a/debian/junit.prerm b/debian/junit.prerm
new file mode 100644
index 0000000..6ea146b
--- /dev/null
+++ b/debian/junit.prerm
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/junit ]; then
+  rm -f /usr/doc/junit
+fi
+#DEBHELPER#
diff --git a/debian/junit.sh b/debian/junit.sh
new file mode 100644
index 0000000..c85dae2
--- /dev/null
+++ b/debian/junit.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+#
+# junit command line program for Debian
+# author:  Takashi Okamoto <tora at debian.org>
+# usage:
+#        junit [-text] <TestCase> output result with text. 
+#                                 This mode is default.
+#        junit -awt <TestCase>    output result with awt ui.
+#        junit -swing <TestCase>  output result with swing ui.
+
+
+TESTRUNNER=junit.textui.TestRunner
+CLASSPATH=${CLASSPATH}:/usr/share/java/junit.jar:.
+
+if [ "$#" = "0" ]; then
+  TESTRUNNER=junit.awtui.TestRunner
+fi
+
+if [ "$1" = "-text" ] ; then
+  shift;
+  if [ "$#" = "0" ] ; then
+    FLAG=false
+  fi
+elif [ "$1" = "-swing" ] ; then
+  shift;
+  TESTRUNNER=junit.swingui.TestRunner
+  if [ "$#" != "0" ]; then
+	echo "-swing option should not have other arguments"
+	exit;
+  fi
+
+elif [ "$1" = "-awt" ] ; then
+  shift
+  TESTRUNNER=junit.awtui.TestRunner
+  if [ "$#" != "0" ]; then	
+	echo "-awt option should not have other arguments"
+	exit;
+  fi
+
+fi
+
+
+if [ "$1" = "-help" ] || [ "$FLAG" = "false" ] ; then
+  echo "junit 3.8.1 -- this version is modified by Takashi Okamoto <tora at debian.org> for Debian."
+  echo "Usage:	junit "
+  echo "		-text  <TestCaseName> -  using text user interface."
+  echo "		-awt	- using awt user interface."
+  echo "		-swing	- using swing user interface."
+  echo "TestCaseName is the name of the TestCase class"
+  exit
+fi
+
+exec java -classpath ${CLASSPATH} ${TESTRUNNER}  ${1+"$@"}
+
+
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..992eace
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,78 @@
+#!/usr/bin/make -f
+# Made with the aid of debmake, by Christoph Lameter,
+# based on the sample debian/rules file for GNU hello by Ian Jackson.
+
+package=junit
+version=3.8.1
+
+export JAVA_HOME=/usr/lib/kaffe
+
+CLASSPATH=.:/usr/share/kaffe-common/lib/rt.jar
+JAVAC=jikes
+JAVADOC=/usr/bin/gjdoc
+JARNAME=junit.jar
+
+export LANG=C
+
+
+build:
+	dh_testdir
+
+	(mkdir src; cd src; fastjar xvf ../src.jar)
+	(rm  src/junit/swingui/*.java; cp debian/TestRunner.java src/junit/swingui)
+	patch -p0 < debian/AboutDialog.java.diff
+	(cd src;${JAVAC} -d ../classes -classpath ${CLASSPATH} -target 1.3 junit/*/*.java)
+
+	cp -r src/junit/swingui/icons classes/junit/swingui
+	cp src/junit/runner/*.gif classes/junit/runner
+	cp src/junit/runner/excluded.properties classes/junit/runner
+	(jar cvf ${JARNAME} -C classes  junit)
+
+	mkdir javadoc
+	(cd src;${JAVADOC} -d ../javadoc junit.framework junit.awtui junit.swingui junit.runner junit.textui junit.extensions)
+
+	touch build
+
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean
+	-rm -f build
+	-rm -rf classes javadoc junit.jar
+	-rm -f `find . -name "*~"`
+	-rm -rf src
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	-rm -f javadoc/package-list
+	install -d debian/tmp
+	cd debian/tmp && install -d `cat ../dirs`
+	install -m 644 ${JARNAME} debian/tmp/usr/share/java/junit-${version}.jar
+	install -m 755 debian/junit.sh debian/tmp/usr/bin/junit
+
+	dh_movefiles  
+	dh_installdirs
+
+binary-indep: build install
+	dh_testdir -i
+	dh_testroot -i
+	dh_installman -i debian/junit.1
+	dh_installchangelogs -i
+	dh_link -i
+	dh_compress -i
+	dh_installdocs -i
+	dh_installexamples  -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+binary-arch: build install 
+
+binary: binary-indep binary-arch
+
+.PHONY: binary binary-arch binary-indep clean checkroot
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..097f585
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://prdownloads.sourceforge.net/junit/junit(.\..*)\.zip

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/junit.git



More information about the pkg-java-commits mailing list