--- old/test/java/io/File/Mkdir.java 2013-08-12 16:53:47.459256350 +0400 +++ new/test/java/io/File/Mkdir.java 2013-08-12 16:53:47.023261830 +0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2013 Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,8 +22,8 @@ */ /* @test - @bug 4344760 - @summary Test mkdirs with . in path + @bug 4344760 6883354 + @summary Test mkdirs with . or .. in path */ import java.io.*; @@ -32,8 +32,16 @@ static File a_dot = new File(a, "."); static File a_dot_b = new File(a_dot, "b"); + static File aa = new File("aa"); + static File bb = new File("bb"); + static File aa_dot_dot = new File(aa, ".."); + static File aa_dot_dot_bb = new File(aa_dot_dot, "bb"); + public static void main(String[] args) throws Exception { - if (!a_dot_b.mkdirs()) + if (!a_dot_b.mkdirs() || + !aa_dot_dot_bb.mkdirs() || !aa.exists() || !bb.exists() || + !aa_dot_dot_bb.exists()) { throw new Exception("Test failed"); + } } }