# file      : tests/dir-iterator/testscript
# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

test.options = -v

: file
:
mkdir a;
touch a/b;
$* a >"reg     b"

: dir
:
mkdir -p a/b;
$* a >"dir     b"

: dangling-link
:
if ($cxx.target.class != 'windows')
{
  +mkdir a
  +touch --no-cleanup a/b
  +ln -s a/b a/l
  +rm a/b

  +touch a/c

  $* ../a     >! 2>!       != 0 : keep
  $* -i ../a  >'reg     c'      : skip
}