Sync from SUSE:ALP:Source:Standard:1.0 junit revision 0c68396a9c92542bea9b9790c95c7d37
This commit is contained in:
commit
0c2f87aa44
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
## Default LFS
|
||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.png filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
108
0001-Port-to-hamcrest-2.2.patch
Normal file
108
0001-Port-to-hamcrest-2.2.patch
Normal file
@ -0,0 +1,108 @@
|
|||||||
|
From 85c780b61cd35b4544d2926393805e1699641f38 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marian Koncek <mkoncek@redhat.com>
|
||||||
|
Date: Fri, 6 Mar 2020 14:28:05 +0100
|
||||||
|
Subject: [PATCH] Port to hamcrest 2.2
|
||||||
|
|
||||||
|
---
|
||||||
|
.../org/junit/internal/matchers/StacktracePrintingMatcher.java | 3 ---
|
||||||
|
.../org/junit/internal/matchers/ThrowableCauseMatcher.java | 2 --
|
||||||
|
.../org/junit/internal/matchers/ThrowableMessageMatcher.java | 2 --
|
||||||
|
src/main/java/org/junit/matchers/JUnitMatchers.java | 2 +-
|
||||||
|
.../experimental/theories/runner/WithDataPointMethod.java | 2 +-
|
||||||
|
5 files changed, 2 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
|
||||||
|
index 93a6827..3ea4a81 100644
|
||||||
|
--- a/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
|
||||||
|
+++ b/src/main/java/org/junit/internal/matchers/StacktracePrintingMatcher.java
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
package org.junit.internal.matchers;
|
||||||
|
|
||||||
|
import org.hamcrest.Description;
|
||||||
|
-import org.hamcrest.Factory;
|
||||||
|
import org.hamcrest.Matcher;
|
||||||
|
|
||||||
|
import org.junit.internal.Throwables;
|
||||||
|
@@ -39,13 +38,11 @@ public class StacktracePrintingMatcher<T extends Throwable> extends
|
||||||
|
return Throwables.getStacktrace(throwable);
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Factory
|
||||||
|
public static <T extends Throwable> Matcher<T> isThrowable(
|
||||||
|
Matcher<T> throwableMatcher) {
|
||||||
|
return new StacktracePrintingMatcher<T>(throwableMatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Factory
|
||||||
|
public static <T extends Exception> Matcher<T> isException(
|
||||||
|
Matcher<T> exceptionMatcher) {
|
||||||
|
return new StacktracePrintingMatcher<T>(exceptionMatcher);
|
||||||
|
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
|
||||||
|
index 6e2ff5e..1f0a0a0 100644
|
||||||
|
--- a/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
|
||||||
|
+++ b/src/main/java/org/junit/internal/matchers/ThrowableCauseMatcher.java
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
package org.junit.internal.matchers;
|
||||||
|
|
||||||
|
import org.hamcrest.Description;
|
||||||
|
-import org.hamcrest.Factory;
|
||||||
|
import org.hamcrest.Matcher;
|
||||||
|
import org.hamcrest.TypeSafeMatcher;
|
||||||
|
|
||||||
|
@@ -43,7 +42,6 @@ public class ThrowableCauseMatcher<T extends Throwable> extends
|
||||||
|
* @param matcher to apply to the cause of the outer exception
|
||||||
|
* @param <T> type of the outer exception
|
||||||
|
*/
|
||||||
|
- @Factory
|
||||||
|
public static <T extends Throwable> Matcher<T> hasCause(final Matcher<?> matcher) {
|
||||||
|
return new ThrowableCauseMatcher<T>(matcher);
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
|
||||||
|
index 74386a8..7d16b11 100644
|
||||||
|
--- a/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
|
||||||
|
+++ b/src/main/java/org/junit/internal/matchers/ThrowableMessageMatcher.java
|
||||||
|
@@ -1,7 +1,6 @@
|
||||||
|
package org.junit.internal.matchers;
|
||||||
|
|
||||||
|
import org.hamcrest.Description;
|
||||||
|
-import org.hamcrest.Factory;
|
||||||
|
import org.hamcrest.Matcher;
|
||||||
|
import org.hamcrest.TypeSafeMatcher;
|
||||||
|
|
||||||
|
@@ -30,7 +29,6 @@ public class ThrowableMessageMatcher<T extends Throwable> extends
|
||||||
|
matcher.describeMismatch(item.getMessage(), description);
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Factory
|
||||||
|
public static <T extends Throwable> Matcher<T> hasMessage(final Matcher<String> matcher) {
|
||||||
|
return new ThrowableMessageMatcher<T>(matcher);
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/org/junit/matchers/JUnitMatchers.java b/src/main/java/org/junit/matchers/JUnitMatchers.java
|
||||||
|
index 13407cc..8889266 100644
|
||||||
|
--- a/src/main/java/org/junit/matchers/JUnitMatchers.java
|
||||||
|
+++ b/src/main/java/org/junit/matchers/JUnitMatchers.java
|
||||||
|
@@ -56,7 +56,7 @@ public class JUnitMatchers {
|
||||||
|
* @deprecated Please use {@link CoreMatchers#everyItem(Matcher)} instead.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
- public static <T> Matcher<Iterable<T>> everyItem(final Matcher<T> elementMatcher) {
|
||||||
|
+ public static <T> Matcher<Iterable<? extends T>> everyItem(final Matcher<T> elementMatcher) {
|
||||||
|
return CoreMatchers.everyItem(elementMatcher);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
|
||||||
|
index f2b2753..e5759ed 100644
|
||||||
|
--- a/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
|
||||||
|
+++ b/src/test/java/org/junit/tests/experimental/theories/runner/WithDataPointMethod.java
|
||||||
|
@@ -108,7 +108,7 @@ public class WithDataPointMethod {
|
||||||
|
return JUnitCore.runClasses(type).getFailures();
|
||||||
|
}
|
||||||
|
|
||||||
|
- private Matcher<Iterable<Failure>> empty() {
|
||||||
|
+ private Matcher<Iterable<? extends Failure>> empty() {
|
||||||
|
return everyItem(nullValue(Failure.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.25.2
|
||||||
|
|
394
build.xml
Normal file
394
build.xml
Normal file
@ -0,0 +1,394 @@
|
|||||||
|
<project name="junit" default="dist" basedir="."
|
||||||
|
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
|
||||||
|
<tstamp />
|
||||||
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
|
||||||
|
|
||||||
|
<property file="${user.home}/.junit.properties" />
|
||||||
|
<property name="src" value="src/main/java" />
|
||||||
|
<property name="target" location="target" />
|
||||||
|
<property name="bin" location="${target}/main" />
|
||||||
|
<property name="version-base" value="4.13.2" />
|
||||||
|
<property name="version-bundle" value="${version-base}" />
|
||||||
|
<property name="version-status" value="-SNAPSHOT" />
|
||||||
|
<property name="version" value="${version-base}${version-status}" />
|
||||||
|
<property name="dist" value="junit${version}" />
|
||||||
|
<property name="versionfile" value="${src}/junit/runner/Version.java" />
|
||||||
|
<property name="zipfile" value="${dist}/${dist}.zip" />
|
||||||
|
<property name="testsrc" location="src/test/java" />
|
||||||
|
<property name="testrsrc" location="src/test/resources" />
|
||||||
|
<property name="testbin" location="${target}/test/java" />
|
||||||
|
<property name="unjarred"
|
||||||
|
value="**/*.jar, ${testfiles}, doc/**, README.html, .classpath, .project, cpl-v10.html" />
|
||||||
|
|
||||||
|
<property name="binjar" value="junit-${version}.jar" />
|
||||||
|
<property name="srcjar" value="junit-${version}-src.jar" />
|
||||||
|
<property name="docjar" value="junit-${version}-javadoc.jar" />
|
||||||
|
|
||||||
|
<property name="depjar" value="junit-dep-${version}.jar" />
|
||||||
|
<property name="depsrcjar" value="junit-dep-${version}-src.jar" />
|
||||||
|
<property name="depdocjar" value="junit-dep-${version}-javadoc.jar" />
|
||||||
|
|
||||||
|
<property name="javadocdir" location="${dist}/javadoc" />
|
||||||
|
<property name="javadoczip" location="${dist}-javadoc.zip" />
|
||||||
|
<property name="hamcrestlib" location="lib/hamcrest-core-1.3.jar" />
|
||||||
|
<property name="hamcrestlibsources" location="lib/hamcrest-core-1.3-sources.jar" />
|
||||||
|
<property name="hamcrestsrc" location="${dist}/temp.hamcrest.source" />
|
||||||
|
|
||||||
|
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
|
||||||
|
|
||||||
|
<property name="compiler.release" value="8" />
|
||||||
|
<property name="compiler.source" value="1.${compiler.release}" />
|
||||||
|
<property name="compiler.target" value="${compiler.source}" />
|
||||||
|
|
||||||
|
<target name="init">
|
||||||
|
<tstamp/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="versiontag" depends="init">
|
||||||
|
<filter token="version" value="${version}" />
|
||||||
|
|
||||||
|
<copy
|
||||||
|
file="${versionfile}.template"
|
||||||
|
tofile="${versionfile}"
|
||||||
|
filtering="on"
|
||||||
|
overwrite="true"
|
||||||
|
/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="clean">
|
||||||
|
<!-- If two builds are made within a minute -->
|
||||||
|
<delete dir="${dist}" quiet="true" />
|
||||||
|
<!-- Delete all previous temporary build artifacts -->
|
||||||
|
<delete dir="${target}" quiet="true" />
|
||||||
|
|
||||||
|
<delete file="${zipfile}" quiet="true"/>
|
||||||
|
<delete file="${javadoczip}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<macrodef name="junit_compilation">
|
||||||
|
<attribute name="srcdir"/>
|
||||||
|
<attribute name="destdir"/>
|
||||||
|
<attribute name="classpath"/>
|
||||||
|
<sequential>
|
||||||
|
<mkdir dir="@{destdir}"/>
|
||||||
|
<javac
|
||||||
|
srcdir="@{srcdir}"
|
||||||
|
destdir="@{destdir}"
|
||||||
|
debug="on"
|
||||||
|
classpath="@{classpath}"
|
||||||
|
includeantruntime="false"
|
||||||
|
release="${compiler.release}"
|
||||||
|
source="${compiler.source}"
|
||||||
|
target="${compiler.target}"
|
||||||
|
>
|
||||||
|
<compilerarg value="-Xlint:unchecked" />
|
||||||
|
</javac>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="build" depends="versiontag">
|
||||||
|
<junit_compilation srcdir="${src}" destdir="${bin}" classpath="${hamcrestlib}"/>
|
||||||
|
<unjar src="${hamcrestlib}" dest="${bin}" />
|
||||||
|
<junit_compilation srcdir="${testsrc}" destdir="${testbin}" classpath="${hamcrestlib};${bin}"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="jars" depends="build">
|
||||||
|
<mkdir dir="${dist}" />
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/${srcjar}"
|
||||||
|
basedir="${src}"
|
||||||
|
excludes="${unjarred}, **/*.class"
|
||||||
|
/>
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/${binjar}"
|
||||||
|
basedir="${bin}"
|
||||||
|
excludes="${unjarred}, **/*.java, build.xml">
|
||||||
|
<manifest>
|
||||||
|
<attribute name="Bundle-Description" value="JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck."/>
|
||||||
|
<attribute name="Bundle-DocURL" value="http://www.junit.org"/>
|
||||||
|
<attribute name="Bundle-License" value="http://www.eclipse.org/legal/epl-v10.html"/>
|
||||||
|
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||||
|
<attribute name="Bundle-Name" value="JUnit"/>
|
||||||
|
<attribute name="Bundle-SymbolicName" value="org.junit"/>
|
||||||
|
<attribute name="Bundle-Vendor" value="JUnit"/>
|
||||||
|
<attribute name="Bundle-Version" value="${version-bundle}"/>
|
||||||
|
<attribute name="Export-Package" value="junit.extensions;version="${version-bundle}",junit.framework;version="${version-bundle}",junit.runner;version="${version-bundle}",junit.textui;version="${version-bundle}",org.junit.experimental.categories;version="${version-bundle}",org.junit.experimental.max;version="${version-bundle}",org.junit.experimental.results;version="${version-bundle}",org.junit.experimental.runners;version="${version-bundle}",org.junit.experimental.theories.internal;x-internal:=true;version="${version-bundle}",org.junit.experimental.theories.suppliers;version="${version-bundle}",org.junit.experimental.theories;version="${version-bundle}",org.junit.experimental;version="${version-bundle}",org.junit.function;version="${version-bundle}",org.junit.internal.builders;x-internal:=true;version="${version-bundle}",org.junit.internal.management;x-internal:=true;version="${version-bundle}",org.junit.internal.matchers;x-internal:=true;version="${version-bundle}",org.junit.internal.requests;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.model;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.rules;x-internal:=true;version="${version-bundle}",org.junit.internal.runners.statements;x-internal:=true;version="${version-bundle}",org.junit.internal.runners;x-internal:=true;version="${version-bundle}",org.junit.internal;x-internal:=true;version="${version-bundle}",org.junit.matchers;version="${version-bundle}",org.junit.rules;version="${version-bundle}",org.junit.runner.manipulation;version="${version-bundle}",org.junit.runner.notification;version="${version-bundle}",org.junit.runner;version="${version-bundle}",org.junit.runners.model;version="${version-bundle}",org.junit.runners.parameterized;version="${version-bundle}",org.junit.runners;version="${version-bundle}",org.junit.validator;version="${version-bundle}",org.junit;version="${version-bundle}""/>
|
||||||
|
<attribute name="Implementation-Title" value="JUnit"/>
|
||||||
|
<attribute name="Implementation-URL" value="http://junit.org"/>
|
||||||
|
<attribute name="Implementation-Vendor" value="JUnit"/>
|
||||||
|
<attribute name="Implementation-Vendor-Id" value="junit"/>
|
||||||
|
<attribute name="Implementation-Version" value="${version-base}"/>
|
||||||
|
<attribute name="Import-Package" value="junit.extensions,junit.framework,junit.runner,org.hamcrest.core,org.hamcrest,org.junit,org.junit.experimental.theories,org.junit.experimental.theories.internal,org.junit.function,org.junit.internal,org.junit.internal.builders,org.junit.internal.management,org.junit.internal.matchers,org.junit.internal.requests,org.junit.internal.runners,org.junit.internal.runners.model,org.junit.internal.runners.rules,org.junit.internal.runners.statements,org.junit.matchers,org.junit.rules,org.junit.runner,org.junit.runner.manipulation,org.junit.runner.notification,org.junit.runners,org.junit.runners.model,org.junit.runners.parameterized,org.junit.validator"/>
|
||||||
|
<attribute name="JavaPackages-ArtifactId" value="junit"/>
|
||||||
|
<attribute name="JavaPackages-GroupId" value="junit"/>
|
||||||
|
<attribute name="JavaPackages-Version" value="${version-base}"/>
|
||||||
|
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||||
|
</manifest>
|
||||||
|
</jar>
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/${depjar}"
|
||||||
|
basedir="${bin}"
|
||||||
|
excludes="${unjarred}, org/hamcrest/**, **/*.java, build.xml"
|
||||||
|
/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="all.maven.jars" depends="jars,javadoc">
|
||||||
|
<mkdir dir="${dist}" />
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/${depsrcjar}"
|
||||||
|
basedir="${src}"
|
||||||
|
excludes="${unjarred}, **/*.class"
|
||||||
|
/>
|
||||||
|
<jar
|
||||||
|
jarfile="${dist}/${depdocjar}"
|
||||||
|
basedir="${javadocdir}"
|
||||||
|
excludes="${unjarred}, org/hamcrest/**"
|
||||||
|
/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="samples-and-tests">
|
||||||
|
<copy todir="${dist}">
|
||||||
|
<fileset dir="${testbin}" />
|
||||||
|
<fileset dir="${testsrc}" />
|
||||||
|
<fileset dir="${testrsrc}" />
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="javadoc">
|
||||||
|
<javadoc destdir="${javadocdir}"
|
||||||
|
source="${compiler.source}"
|
||||||
|
author="false"
|
||||||
|
version="false"
|
||||||
|
use="false"
|
||||||
|
windowtitle="JUnit API"
|
||||||
|
>
|
||||||
|
<excludepackage name="junit.*" />
|
||||||
|
<excludepackage name="org.junit.internal.*" />
|
||||||
|
<excludepackage name="org.junit.experimental.theories.internal.*" />
|
||||||
|
|
||||||
|
<sourcepath location="${src}" />
|
||||||
|
<sourcepath location="${hamcrestsrc}" />
|
||||||
|
</javadoc>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="javadoczip">
|
||||||
|
<delete file="${javadoczip}" />
|
||||||
|
<antcall target="javadoc" />
|
||||||
|
<zip basedir="${javadocdir}" file="${javadoczip}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="populate-dist"
|
||||||
|
depends="clean, build, jars, samples-and-tests, javadoc"
|
||||||
|
>
|
||||||
|
<copy todir="${dist}/doc">
|
||||||
|
<fileset dir="doc"/>
|
||||||
|
</copy>
|
||||||
|
<copy file="README.md" tofile="${dist}/README.md" />
|
||||||
|
<copy file="BUILDING" tofile="${dist}/BUILDING" />
|
||||||
|
<copy file="epl-v10.html" tofile="${dist}/epl-v10.html" />
|
||||||
|
<copy file="build.xml" tofile="${dist}/build.xml" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<macrodef name="run-dist-tests">
|
||||||
|
<!-- Runs the tests against the built jar files -->
|
||||||
|
<element name="extra-args" implicit="yes" />
|
||||||
|
<sequential>
|
||||||
|
<java classname="org.junit.runner.JUnitCore" fork="yes" failonerror="true">
|
||||||
|
<extra-args />
|
||||||
|
<arg value="org.junit.tests.AllTests"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${dist}" />
|
||||||
|
<pathelement location="${dist}/${binjar}" />
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="run-local-tests">
|
||||||
|
<!-- Runs the tests against the local class files -->
|
||||||
|
<sequential>
|
||||||
|
<java classname="org.junit.runner.JUnitCore" fork="yes" failonerror="true">
|
||||||
|
<arg value="org.junit.tests.AllTests"/>
|
||||||
|
<classpath>
|
||||||
|
<pathelement location="${bin}" />
|
||||||
|
<pathelement location="${testbin}" />
|
||||||
|
<pathelement location="${hamcrestlib}" />
|
||||||
|
</classpath>
|
||||||
|
</java>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="test" depends="build">
|
||||||
|
<run-local-tests />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="dist" depends="populate-dist">
|
||||||
|
<run-dist-tests>
|
||||||
|
<jvmarg value="-Dignore.this=ignored"/>
|
||||||
|
</run-dist-tests>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="profile" depends="populate-dist">
|
||||||
|
<run-dist-tests>
|
||||||
|
<jvmarg value="-agentlib:hprof=cpu=samples"/>
|
||||||
|
</run-dist-tests>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="zip" depends="dist">
|
||||||
|
<zip zipfile="${zipfile}" basedir="." includes="${dist}/**" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="upload.to.sourceforge" depends="zip">
|
||||||
|
<ftp server="upload.sourceforge.net"
|
||||||
|
userid="anonymous"
|
||||||
|
password="saff@mit.edu"
|
||||||
|
remotedir="incoming"
|
||||||
|
>
|
||||||
|
<fileset dir="${dist}" includes="*.jar" />
|
||||||
|
<fileset file="${zipfile}" />
|
||||||
|
</ftp>
|
||||||
|
<echo message="To upload docs, use build/upload_docs.sh" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<!-- to do automatic build upload, you need the maven ant tasks jar. -->
|
||||||
|
<!-- therefore, you must run ant as ant -lib build/lib stage.maven -->
|
||||||
|
<macrodef name="push.maven.artifact">
|
||||||
|
<attribute name="file" />
|
||||||
|
<attribute name="pom" />
|
||||||
|
<attribute name="packaging" />
|
||||||
|
<attribute name="url" />
|
||||||
|
<attribute name="repo.id" />
|
||||||
|
<element name="artifact.args" implicit="true" optional="true" />
|
||||||
|
<sequential>
|
||||||
|
<artifact:mvn failonerror="true">
|
||||||
|
<arg value="${maven.deploy.goal}" />
|
||||||
|
<arg value="-Durl=@{url}" />
|
||||||
|
<arg value="-DrepositoryId=@{repo.id}" />
|
||||||
|
<arg value="-DpomFile=@{pom}" />
|
||||||
|
<arg value="-Dfile=@{file}" />
|
||||||
|
<arg value="-Dpackaging=@{packaging}" />
|
||||||
|
<artifact.args />
|
||||||
|
<arg value="-Pgpg" />
|
||||||
|
</artifact:mvn>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="push.maven.jar">
|
||||||
|
<attribute name="jar" />
|
||||||
|
<attribute name="pom" />
|
||||||
|
<attribute name="url" />
|
||||||
|
<attribute name="repo.id" />
|
||||||
|
<element name="artifact.args" implicit="true" optional="true" />
|
||||||
|
<sequential>
|
||||||
|
<echo message="Pushing JAR to Maven: @{jar} -> @{url}" />
|
||||||
|
<push.maven.artifact file="@{jar}" pom="@{pom}" packaging="jar"
|
||||||
|
url="@{url}" repo.id="@{repo.id}">
|
||||||
|
<artifact.args />
|
||||||
|
</push.maven.artifact>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="push.maven.pom">
|
||||||
|
<attribute name="pom" />
|
||||||
|
<attribute name="url" />
|
||||||
|
<attribute name="repo.id" />
|
||||||
|
<element name="artifact.args" implicit="true" optional="true" />
|
||||||
|
<sequential>
|
||||||
|
<echo message="Pushing POM to Maven: @{pom} -> @{url}" />
|
||||||
|
<push.maven.artifact file="@{pom}" pom="@{pom}" packaging="pom"
|
||||||
|
url="@{url}" repo.id="@{repo.id}">
|
||||||
|
<artifact.args />
|
||||||
|
</push.maven.artifact>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="push.junit.maven.artifact">
|
||||||
|
<attribute name="url" />
|
||||||
|
<attribute name="repo.id" />
|
||||||
|
<attribute name="is.snapshot" default="true" />
|
||||||
|
<sequential>
|
||||||
|
<local name="m.prefix" />
|
||||||
|
<property name="m.prefix" value="${dist}/junit-dep-${version}" />
|
||||||
|
<local name="m.jar" />
|
||||||
|
<property name="m.jar" value="${m.prefix}.jar" />
|
||||||
|
<local name="m.sources.jar" />
|
||||||
|
<property name="m.sources.jar" value="${m.prefix}-src.jar" />
|
||||||
|
<local name="m.javadoc.jar" />
|
||||||
|
<property name="m.javadoc.jar" value="${m.prefix}-javadoc.jar" />
|
||||||
|
<local name="m.pom" />
|
||||||
|
<property name="m.pom" value="${dist}/pom-junit.xml" />
|
||||||
|
|
||||||
|
<filter token="version" value="${version}" />
|
||||||
|
<copy
|
||||||
|
file="build/maven/junit-pom-template.xml"
|
||||||
|
tofile="${m.pom}"
|
||||||
|
filtering="on"
|
||||||
|
overwrite="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<push.maven.jar jar="${m.jar}" pom="${m.pom}"
|
||||||
|
url="@{url}" repo.id="@{repo.id}" />
|
||||||
|
|
||||||
|
<if>
|
||||||
|
<equals arg1="@{is.snapshot}" arg2="false" />
|
||||||
|
<then>
|
||||||
|
<push.maven.jar jar="${m.sources.jar}" pom="${m.pom}"
|
||||||
|
url="@{url}" repo.id="@{repo.id}">
|
||||||
|
<arg value="-Dclassifier=sources" />
|
||||||
|
</push.maven.jar>
|
||||||
|
<push.maven.jar jar="${m.javadoc.jar}" pom="${m.pom}"
|
||||||
|
url="@{url}" repo.id="@{repo.id}">
|
||||||
|
<arg value="-Dclassifier=javadoc" />
|
||||||
|
</push.maven.jar>
|
||||||
|
</then>
|
||||||
|
</if>
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<macrodef name="push.junit-dep.maven.artifact">
|
||||||
|
<attribute name="url" />
|
||||||
|
<attribute name="repo.id" />
|
||||||
|
<sequential>
|
||||||
|
<local name="m.pom" />
|
||||||
|
<property name="m.pom" value="${dist}/pom-junit-dep.xml" />
|
||||||
|
|
||||||
|
<filter token="version" value="${version}" />
|
||||||
|
<copy
|
||||||
|
file="build/maven/junit-dep-pom-template.xml"
|
||||||
|
tofile="${m.pom}"
|
||||||
|
filtering="on"
|
||||||
|
overwrite="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<push.maven.pom pom="${m.pom}"
|
||||||
|
url="@{url}" repo.id="@{repo.id}" />
|
||||||
|
</sequential>
|
||||||
|
</macrodef>
|
||||||
|
|
||||||
|
<target name="stage.maven" depends="all.maven.jars">
|
||||||
|
<property name="stage.url"
|
||||||
|
value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
|
||||||
|
<property name="stage.repo.id" value="sonatype-nexus-staging" />
|
||||||
|
|
||||||
|
<push.junit.maven.artifact url="${stage.url}"
|
||||||
|
repo.id="${stage.repo.id}"
|
||||||
|
is.snapshot="false" />
|
||||||
|
<push.junit-dep.maven.artifact url="${stage.url}"
|
||||||
|
repo.id="${stage.repo.id}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="snapshot.maven" depends="all.maven.jars">
|
||||||
|
<property name="snapshot.url"
|
||||||
|
value="https://oss.sonatype.org/content/repositories/snapshots/" />
|
||||||
|
<property name="snapshot.repo.id" value="sonatype-nexus-snapshots" />
|
||||||
|
|
||||||
|
<push.junit.maven.artifact url="${snapshot.url}"
|
||||||
|
repo.id="${snapshot.repo.id}" />
|
||||||
|
<push.junit-dep.maven.artifact url="${snapshot.url}"
|
||||||
|
repo.id="${snapshot.repo.id}" />
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="print.version">
|
||||||
|
<echo message="${version}" />
|
||||||
|
</target>
|
||||||
|
</project>
|
192
junit.changes
Normal file
192
junit.changes
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 21 07:53:02 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Let ant build with --release 8 if the compiler knows that option.
|
||||||
|
This allows us to avoid incompatible exception declarations
|
||||||
|
in ObjectInputStream.GetField.get(String,Object) in java >= 20
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 23 17:18:10 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Conditionalize the spec file so that junit can be built with
|
||||||
|
both hamcrest 1.3 and 2.2 from the same sources
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 9 18:02:17 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* 0001-Port-to-hamcrest-2.2.patch
|
||||||
|
+ do not use the org.hamcrest.Factory that was removed in
|
||||||
|
hamcrest 2.x and should have been an internal annotation
|
||||||
|
only
|
||||||
|
+ fix some incompatibilities with template types in matchers
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 18 16:38:08 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Build with source/target levels 8
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 12 12:57:43 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 4.13.2:
|
||||||
|
* Mark ThreadGroups created by FailOnTimeout as daemon groups
|
||||||
|
* Only create ThreadGroups if FailOnTimeout.lookForStuckThread is true.
|
||||||
|
* Fix NotSerializableException with AssumptionViolatedException
|
||||||
|
* Security fix: TemporaryFolder now limits access to temporary folders on
|
||||||
|
Java 1.7 or later (CVE-2020-1945, bsc#1171696)
|
||||||
|
* Make FrameworkField constructor public
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 7 12:20:17 UTC 2020 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Upgrade to 4.13
|
||||||
|
- Removed patches:
|
||||||
|
* junit-jdk10.patch
|
||||||
|
* junit-jdk11.patch
|
||||||
|
+ not needed with this version
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 4 17:16:22 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Add OSGi manifest to the jar file
|
||||||
|
- Package the manual
|
||||||
|
- BuildRequire and Require hamcrest-core, since the package does
|
||||||
|
strictly depend on hamcrest-core only.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jan 21 23:36:15 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
- Trim repeated metadata from description.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 26 06:27:56 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||||
|
|
||||||
|
- Upgrade to 4.12
|
||||||
|
- Removed patches:
|
||||||
|
* junit-jdk8.patch
|
||||||
|
* junit-jdk9.patch
|
||||||
|
* junit-no-hamcrest-src.patch
|
||||||
|
+ Integrated directly in the added build.xml file
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 11 14:52:48 UTC 2018 - fstrba@suse.com
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* junit-jdk11.patch
|
||||||
|
+ Fix build with jdk11
|
||||||
|
+ Don't override removed SecurityManager methods
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 18 15:40:52 UTC 2017 - fstrba@suse.com
|
||||||
|
|
||||||
|
- Run fdupes on documentation
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 18 15:35:28 UTC 2017 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Harden and fix the test suite:
|
||||||
|
+ org.framework.junit is deprecated since junit 4.0
|
||||||
|
+ Ensure we fail check when junit no longer returns what we
|
||||||
|
expect it to (error code checking is useless, since Assert
|
||||||
|
returns !0, like any other failure to start the test).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 18 09:34:48 UTC 2017 - fstrba@suse.com
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* junit-jdk10.patch
|
||||||
|
+ Remove a function getInCheck from NoExitSecurityManager,
|
||||||
|
since it does not exist in the extended class in jdk10 and is
|
||||||
|
deprecated in previous versions
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Sep 8 08:42:24 UTC 2017 - fstrba@suse.com
|
||||||
|
|
||||||
|
- Added patch:
|
||||||
|
* junit-jdk9.patch
|
||||||
|
+ Build with java source and target levels 1.6 in order to
|
||||||
|
allow building with jdk9
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 19 10:03:43 UTC 2017 - dziolkowski@suse.com
|
||||||
|
|
||||||
|
- New build dependency: javapackages-local
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 28 07:53:29 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Add patch to build with jdk8:
|
||||||
|
* junit-jdk8.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 18 09:46:15 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Fix build with new javapackages-tools
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 25 07:39:22 UTC 2013 - mvyskocil@suse.com
|
||||||
|
|
||||||
|
- Update to 4.11
|
||||||
|
* Matchers: Upgrade to Hamcrest 1.3
|
||||||
|
no longer included junit jar
|
||||||
|
* Parameterized Tests
|
||||||
|
* Specify Test execution order
|
||||||
|
* New maven artifact 'junit:junit' w/o builtin hamcrest
|
||||||
|
* Number of improvements into Rules
|
||||||
|
- Drop jdk7-testfailure.patch, fixed upstream
|
||||||
|
- Add junit-no-hamcrest-src.patch, don't bundle hamcrest into junit.jar
|
||||||
|
- Use SourceUrl for release tarball and pom
|
||||||
|
- Don't inject OSGI manifest, it breaks junit.jar
|
||||||
|
- Provide/obsolete package junit4
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Aug 23 09:35:53 UTC 2013 - mvyskocil@suse.com
|
||||||
|
|
||||||
|
- disable javadoc build
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 11 16:14:37 CEST 2008 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- Use gcc-java for build
|
||||||
|
- Update 3.8.2 (a new build.xml)
|
||||||
|
- Removed a java14compat
|
||||||
|
- Removed javadoc postin/postun
|
||||||
|
- Add a cpl-v10.html
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 30 01:45:59 CEST 2007 - ro@suse.de
|
||||||
|
|
||||||
|
- added unzip to buildreq
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 26 15:24:14 CEST 2006 - skh@suse.de
|
||||||
|
|
||||||
|
- don't use icecream
|
||||||
|
- use source="1.4" and target="1.4" for build with java 1.5
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 25 21:46:48 CET 2006 - mls@suse.de
|
||||||
|
|
||||||
|
- converted neededforbuild to BuildRequires
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 28 15:35:11 CEST 2005 - jsmeix@suse.de
|
||||||
|
|
||||||
|
- Adjustments in the spec file.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Jul 18 16:45:22 CEST 2005 - jsmeix@suse.de
|
||||||
|
|
||||||
|
- Current version 3.8.1 from JPackage.org
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 16 15:05:57 CEST 2004 - skh@suse.de
|
||||||
|
|
||||||
|
- Fix prerequires of javadoc subpackage
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Sep 2 16:30:31 CEST 2004 - skh@suse.de
|
||||||
|
|
||||||
|
- Initial package created with version 3.8.1 (JPackage 1.5)
|
||||||
|
|
130
junit.spec
Normal file
130
junit.spec
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
#
|
||||||
|
# spec file for package junit
|
||||||
|
#
|
||||||
|
# Copyright (c) 2023 SUSE LLC
|
||||||
|
#
|
||||||
|
# All modifications and additions to the file contributed by third parties
|
||||||
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
|
# upon. The license for this file, and modifications and additions to the
|
||||||
|
# file, is the same license as for the pristine package itself (unless the
|
||||||
|
# license for the pristine package is not an Open Source License, in which
|
||||||
|
# case the license is the MIT License). An "Open Source License" is a
|
||||||
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
Name: junit
|
||||||
|
Version: 4.13.2
|
||||||
|
Release: 0
|
||||||
|
Summary: Java regression test package
|
||||||
|
License: EPL-1.0
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
URL: https://junit.org/junit4/
|
||||||
|
Source0: https://github.com/junit-team/junit4/archive/r%{version}.tar.gz
|
||||||
|
Source1: build.xml
|
||||||
|
Patch0: 0001-Port-to-hamcrest-2.2.patch
|
||||||
|
BuildRequires: ant
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: hamcrest >= 1.3
|
||||||
|
BuildRequires: java-devel >= 1.8
|
||||||
|
BuildRequires: javapackages-local
|
||||||
|
Requires: mvn(org.hamcrest:hamcrest-core)
|
||||||
|
Provides: %{name}-demo = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}-demo < %{version}-%{release}
|
||||||
|
Provides: %{name}4-demo = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}4-demo < %{version}-%{release}
|
||||||
|
Provides: %{name}4 = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}4 < %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description
|
||||||
|
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
|
||||||
|
It is used by the developer who implements unit tests in Java.
|
||||||
|
|
||||||
|
%package javadoc
|
||||||
|
Summary: Javadoc for %{name}
|
||||||
|
Group: Documentation/HTML
|
||||||
|
Provides: %{name}4-javadoc = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}4-javadoc < %{version}-%{release}
|
||||||
|
|
||||||
|
%description javadoc
|
||||||
|
Javadoc for %{name}.
|
||||||
|
|
||||||
|
%package manual
|
||||||
|
Summary: Manual for %{name}
|
||||||
|
Group: Documentation/Other
|
||||||
|
Provides: %{name}4-manual = %{version}-%{release}
|
||||||
|
Obsoletes: %{name}4-manual < %{version}-%{release}
|
||||||
|
|
||||||
|
%description manual
|
||||||
|
Documentation for %{name}.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{name}4-r%{version}
|
||||||
|
%if %{?pkg_vcmp:%pkg_vcmp hamcrest >= 2.0}%{!?pkg_vcmp:0}
|
||||||
|
%patch0 -p1
|
||||||
|
%endif
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
|
||||||
|
find . -type f -name "*.jar" -or -name "*.class" | xargs -t rm -rf
|
||||||
|
|
||||||
|
%if %{?pkg_vcmp:%pkg_vcmp hamcrest >= 2.0}%{!?pkg_vcmp:0}
|
||||||
|
ln -s $(build-classpath hamcrest/hamcrest) lib/hamcrest-core-1.3.jar
|
||||||
|
%else
|
||||||
|
ln -s $(build-classpath hamcrest/all) lib/hamcrest-core-1.3.jar
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
export CLASSPATH=$(build-classpath hamcrest)
|
||||||
|
ant jars javadoc -Dversion-status=
|
||||||
|
|
||||||
|
%install
|
||||||
|
# jars
|
||||||
|
install -d -m 755 %{buildroot}%{_javadir}
|
||||||
|
install -m 644 %{name}%{version}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
|
# compat symlink
|
||||||
|
ln -sf %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/%{name}4.jar
|
||||||
|
|
||||||
|
# pom
|
||||||
|
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||||
|
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||||
|
%add_maven_depmap %{name}.pom %{name}.jar
|
||||||
|
|
||||||
|
# javadoc
|
||||||
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
cp -pr %{name}%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%check
|
||||||
|
|
||||||
|
cat > test.java <<EOF
|
||||||
|
import org.junit.Assert;
|
||||||
|
class test {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Assert.fail("Hello world from junit");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
javac -source 8 -target 8 -cp %{buildroot}/%{_javadir}/%{name}.jar test.java
|
||||||
|
java -cp %{buildroot}/%{_javadir}/%{name}.jar: test 2>&1 | \
|
||||||
|
grep 'Exception in thread "main" java.lang.AssertionError: Hello world from junit'
|
||||||
|
|
||||||
|
%files -f .mfiles
|
||||||
|
%license LICENSE-junit.txt
|
||||||
|
%doc CODING_STYLE.txt README.md acknowledgements.txt
|
||||||
|
%{_javadir}/%{name}4.jar
|
||||||
|
|
||||||
|
%files javadoc
|
||||||
|
%license LICENSE-junit.txt
|
||||||
|
%{_javadocdir}/%{name}
|
||||||
|
|
||||||
|
%files manual
|
||||||
|
%license LICENSE-junit.txt
|
||||||
|
%doc doc/*
|
||||||
|
|
||||||
|
%changelog
|
BIN
r4.13.2.tar.gz
(Stored with Git LFS)
Normal file
BIN
r4.13.2.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user