You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

AbstractCvsTaskTest.java 1.8 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright 2002-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. package org.apache.tools.ant.taskdefs;
  18. import java.io.File;
  19. import org.apache.tools.ant.BuildFileTest;
  20. /**
  21. */
  22. public class AbstractCvsTaskTest extends BuildFileTest {
  23. public AbstractCvsTaskTest() {
  24. this( "AbstractCvsTaskTest" );
  25. }
  26. public AbstractCvsTaskTest(String name) {
  27. super(name);
  28. }
  29. public void setUp() {
  30. configureProject("src/etc/testcases/taskdefs/abstractcvstask.xml");
  31. }
  32. public void tearDown() {
  33. executeTarget("cleanup");
  34. }
  35. public void testAbstractCvsTask() {
  36. executeTarget( "all" );
  37. }
  38. public void testPackageAttribute() {
  39. File f = getProject().resolveFile("tmpdir/ant/build.xml");
  40. assertTrue("starting empty", !f.exists());
  41. expectLogContaining("package-attribute", "U ant/build.xml");
  42. assertTrue("now it is there", f.exists());
  43. }
  44. public void testTagAttribute() {
  45. File f = getProject().resolveFile("tmpdir/ant/build.xml");
  46. assertTrue("starting empty", !f.exists());
  47. expectLogContaining("tag-attribute", "ANT_141 (revision: 1.175.2.13)");
  48. assertTrue("now it is there", f.exists());
  49. }
  50. }