1 Tests for internal stack handling.
3 $ source $TESTDIR/setup.sh
5 Non-existing entries are allowed and handled without error.
7 $ _autoenv_stack_entered_add non-existing
8 $ echo $_autoenv_stack_entered
14 $ touch -t 201401010101 sub/file
15 $ _autoenv_stack_entered_add sub
16 $ _autoenv_stack_entered_add sub/file
17 $ _autoenv_stack_entered_add sub/sub2
18 $ echo $_autoenv_stack_entered
19 non-existing sub sub/file sub/sub2
21 $ _autoenv_stack_entered_add non-existing
22 $ echo $_autoenv_stack_entered
23 sub sub/file sub/sub2 non-existing
25 $ echo ${(k)_autoenv_stack_entered}
26 sub sub/file sub/sub2 non-existing
28 $ echo $_autoenv_stack_entered_mtime
29 0 1388538060 0 0 (glob)
31 Touch the file and re-add it.
33 $ touch -t 201401012359 sub/file
34 $ _autoenv_stack_entered_add sub/file
36 The mtime should have been updated.
38 $ echo ${_autoenv_stack_entered_mtime[sub/file]}
41 It should have moved to the end of the stack.
43 $ echo ${(k)_autoenv_stack_entered}
44 sub sub/sub2 non-existing sub/file
46 Test lookup of containing elements.
48 $ _autoenv_stack_entered_contains sub/file
49 $ _autoenv_stack_entered_contains non-existing
50 $ _autoenv_stack_entered_contains not-added