1 | /*
|
---|
2 | * Copyright 2005 The Apache Software Foundation
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | *
|
---|
16 | */
|
---|
17 |
|
---|
18 | package org.apache.tools.ant.taskdefs;
|
---|
19 |
|
---|
20 | import org.apache.tools.ant.BuildFileTest;
|
---|
21 |
|
---|
22 | public class LengthTest extends BuildFileTest {
|
---|
23 |
|
---|
24 | public LengthTest(String name) {
|
---|
25 | super(name);
|
---|
26 | }
|
---|
27 |
|
---|
28 | public void setUp() {
|
---|
29 | configureProject("src/etc/testcases/taskdefs/length.xml");
|
---|
30 | }
|
---|
31 |
|
---|
32 | public void tearDown() {
|
---|
33 | executeTarget("cleanup");
|
---|
34 | }
|
---|
35 |
|
---|
36 | public void testEach() {
|
---|
37 | executeTarget("testEach");
|
---|
38 | }
|
---|
39 |
|
---|
40 | public void testEachCondition() {
|
---|
41 | executeTarget("testEachCondition");
|
---|
42 | }
|
---|
43 |
|
---|
44 | public void testAll() {
|
---|
45 | executeTarget("testAll");
|
---|
46 | }
|
---|
47 |
|
---|
48 | public void testAllCondition() {
|
---|
49 | executeTarget("testAllCondition");
|
---|
50 | }
|
---|
51 |
|
---|
52 | public void testFile() {
|
---|
53 | executeTarget("testFile");
|
---|
54 | }
|
---|
55 |
|
---|
56 | public void testFileCondition() {
|
---|
57 | executeTarget("testFileCondition");
|
---|
58 | }
|
---|
59 |
|
---|
60 | public void testBoth() {
|
---|
61 | executeTarget("testBoth");
|
---|
62 | }
|
---|
63 |
|
---|
64 | public void testBothCondition() {
|
---|
65 | executeTarget("testBothCondition");
|
---|
66 | }
|
---|
67 |
|
---|
68 | public void testDupes() {
|
---|
69 | executeTarget("testDupes");
|
---|
70 | }
|
---|
71 |
|
---|
72 | public void testDupesCondition() {
|
---|
73 | executeTarget("testDupesCondition");
|
---|
74 | }
|
---|
75 |
|
---|
76 | public void testString() {
|
---|
77 | executeTarget("testString");
|
---|
78 | }
|
---|
79 |
|
---|
80 | public void testStringCondition() {
|
---|
81 | executeTarget("testStringCondition");
|
---|
82 | }
|
---|
83 |
|
---|
84 | public void testTrimString() {
|
---|
85 | executeTarget("testTrimString");
|
---|
86 | }
|
---|
87 |
|
---|
88 | public void testTrimStringCondition() {
|
---|
89 | executeTarget("testTrimStringCondition");
|
---|
90 | }
|
---|
91 |
|
---|
92 | public void testNoTrimString() {
|
---|
93 | executeTarget("testNoTrimString");
|
---|
94 | }
|
---|
95 |
|
---|
96 | public void testNoTrimStringCondition() {
|
---|
97 | executeTarget("testNoTrimStringCondition");
|
---|
98 | }
|
---|
99 |
|
---|
100 | public void testStringFile() {
|
---|
101 | expectBuildExceptionContaining("testStringFile",
|
---|
102 | "should fail", "incompatible");
|
---|
103 | }
|
---|
104 |
|
---|
105 | public void testTrimFile() {
|
---|
106 | expectBuildExceptionContaining("testTrimFile",
|
---|
107 | "should fail", "string length function only");
|
---|
108 | }
|
---|
109 |
|
---|
110 | public void testImmutable() {
|
---|
111 | executeTarget("testImmutable");
|
---|
112 | }
|
---|
113 |
|
---|
114 | public void testZipFileSet() {
|
---|
115 | executeTarget("testZipFileSet");
|
---|
116 | }
|
---|
117 |
|
---|
118 | public void testZipFileSetCondition() {
|
---|
119 | executeTarget("testZipFileSetCondition");
|
---|
120 | }
|
---|
121 |
|
---|
122 | }
|
---|