aboutsummaryrefslogtreecommitdiff
path: root/tests/path-entry/testscript
blob: 35b6f6fb168a6bded1faa475e6f45ba768303397 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# file      : tests/path-entry/testscript
# license   : MIT; see accompanying LICENSE file

: existing
:
{
  : file
  :
  : Note that the newline character is translated into 2 characters being
  : printed on Windows. This why we exclude it, to get consistent behavior on
  : both POSIX and Windows.
  :
  cat <:'abc' >=f;
  $* f >>EOO
  regular
  3
  EOO

  : dir
  :
  : Note that the size value is meaningless for directory entries.
  :
  mkdir -p d;
  $* d >>~/EOO/
  directory
  /.
  EOO

  : followed-symlink
  :
  cat <:'abc' >=f;
  ln -s f l;
  $* -l l >>EOO
  regular
  3
  EOO
}

: non-existent
:
$* f == 1