01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: *
17: */
18: package org.apache.tools.ant.taskdefs;
19:
20: import java.io.File;
21:
22: import org.apache.tools.ant.BuildFileTest;
23:
24: /**
25: */
26: public class AbstractCvsTaskTest extends BuildFileTest {
27:
28: public AbstractCvsTaskTest() {
29: this ("AbstractCvsTaskTest");
30: }
31:
32: public AbstractCvsTaskTest(String name) {
33: super (name);
34: }
35:
36: public void setUp() {
37: configureProject("src/etc/testcases/taskdefs/abstractcvstask.xml");
38: }
39:
40: public void tearDown() {
41: executeTarget("cleanup");
42: }
43:
44: public void testAbstractCvsTask() {
45: executeTarget("all");
46: }
47:
48: public void testPackageAttribute() {
49: File f = getProject().resolveFile("tmpdir/ant/build.xml");
50: assertTrue("starting empty", !f.exists());
51: expectLogContaining("package-attribute", "U ant/build.xml");
52: assertTrue("now it is there", f.exists());
53: }
54:
55: public void testTagAttribute() {
56: File f = getProject().resolveFile("tmpdir/ant/build.xml");
57: assertTrue("starting empty", !f.exists());
58: expectLogContaining("tag-attribute",
59: "ANT_141 (revision: 1.175.2.13)");
60: assertTrue("now it is there", f.exists());
61: }
62: }
|