File: junit.sh

package info (click to toggle)
junit 3.8.2-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,704 kB
  • sloc: java: 1,762; sh: 43; makefile: 34; xml: 26
file content (56 lines) | stat: -rw-r--r-- 1,388 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
#
# junit command line program for Debian
# author:  Takashi Okamoto <tora@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@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+"$@"}