This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch: New Test File.getParent


Hi,

this is a new test for File.getParent testing the special
case if pathname is "". This test is currently failing,
a fix is on the way to classpath-patches.

2005-10-28 Wolfgang Baer <WBaer@gmx.de>

* gnu/testlet/java/io/File/getParent.java: New test.


Wolfgang



// Tags: JDK1.0

// Copyright (C) 2005 Free Software Foundation, Inc.
// Written by Wolfgang Baer (WBaer@gmx.de)

// This file is part of Mauve.

// Mauve is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.

// Mauve is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Mauve; see the file COPYING.  If not, write to
// the Free Software Foundation, 59 Temple Place - Suite 330,
// Boston, MA 02111-1307, USA.  */

package gnu.testlet.java.io.File;

import gnu.testlet.TestHarness;
import gnu.testlet.Testlet;

import java.io.File;

/**
 * Tests File.getParent for the special case if
 * given filename in constructor is "".
 */
public class getParent implements Testlet
{
  public void test (TestHarness harness)
  {
  	try 
	{
  	  File testfile = new File("");
      harness.check(testfile.getParent(), null);
  	}
  	catch (Exception e)
	{
  	  harness.debug(e);
  	  harness.check(false);
	}  	
  }     
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]