Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (27 sloc) 1.072 kb
c57acd8 [CAPRI]: add (C)opyright notice and LGPL with static linking exception t...
David Scott authored
1 (*
2 * Copyright (C) 2006-2009 Citrix Systems Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published
6 * by the Free Software Foundation; version 2.1 only. with the special
7 * exception on linking described in file LICENSE.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
13 *)
f1e0a66 Initial import of hg.uk.xensource.com/carbon/trunk/api-libs.hg c/s 255:b...
Xen hg user authored
14 (* test the "." and ".." removal code *)
15
16 let table = [
17 "/tmp/../../../.././././../", "/";
18 "/tmp/foo/bar/../../", "/tmp";
19 "/tmp/foo/bar/.././..", "/tmp";
20 "/tmp/foo/bar/./././../../", "/tmp";
21 "/tmp/foo/bar/../../../", "/"
22 ]
23
24 let _ =
25 List.iter (fun (input, output) ->
26 let output' = Unixext.resolve_dot_and_dotdot input in
27 if output <> output'
28 then failwith (Printf.sprintf "input = [%s] output = [%s] expected = [%s]" input output' output)
29 ) table
Something went wrong with that request. Please try again.