2014-12-02 19:49:23 +02:00
|
|
|
Test $PWD, $autoenv_event, $autoenv_from_dir and $autoenv_to_dir.
|
2014-11-16 13:05:16 +02:00
|
|
|
|
2014-11-21 21:07:06 +02:00
|
|
|
$ source $TESTDIR/setup.sh
|
2014-11-16 13:05:16 +02:00
|
|
|
|
|
|
|
Setup env actions / output.
|
|
|
|
|
2014-11-21 23:51:28 +02:00
|
|
|
$ AUTOENV_LOOK_UPWARDS=1
|
2014-11-16 13:05:16 +02:00
|
|
|
$ mkdir -p sub/sub2
|
|
|
|
$ cd sub
|
2014-12-02 19:49:23 +02:00
|
|
|
$ echo 'echo ENTERED: PWD:${PWD:t} from:${autoenv_from_dir:t} to:${autoenv_to_dir:t} event:${autoenv_event}' > .env
|
|
|
|
$ echo 'echo LEFT: PWD:${PWD:t} from:${autoenv_from_dir:t} to:${autoenv_to_dir:t} event:${autoenv_event}' > .env.leave
|
2014-11-16 13:05:16 +02:00
|
|
|
|
|
|
|
Manually create auth files.
|
|
|
|
|
2014-11-22 00:07:53 +02:00
|
|
|
$ test_autoenv_auth_env_files
|
2014-11-16 13:05:16 +02:00
|
|
|
|
|
|
|
The actual tests.
|
|
|
|
|
|
|
|
$ cd .
|
2014-12-02 19:49:23 +02:00
|
|
|
ENTERED: PWD:sub from:sub to:sub event:enter
|
2014-11-16 13:05:16 +02:00
|
|
|
|
|
|
|
$ cd ..
|
2014-12-02 19:49:23 +02:00
|
|
|
LEFT: PWD:sub from:sub to:cwd.t event:leave
|
2014-11-16 13:05:16 +02:00
|
|
|
|
|
|
|
$ cd sub/sub2
|
2014-12-02 19:49:23 +02:00
|
|
|
ENTERED: PWD:sub from:cwd.t to:sub2 event:enter
|
2014-11-29 14:56:28 +02:00
|
|
|
|
|
|
|
Check that symlinked dirs get handled correctly.
|
|
|
|
|
|
|
|
$ cd ../..
|
2014-12-02 19:49:23 +02:00
|
|
|
LEFT: PWD:sub from:sub2 to:cwd.t event:leave
|
2014-11-29 14:56:28 +02:00
|
|
|
$ ln -s sub sub_linked
|
|
|
|
$ cd sub_linked
|
2014-12-02 19:49:23 +02:00
|
|
|
ENTERED: PWD:sub from:cwd.t to:sub_linked event:enter
|
2014-11-29 14:56:28 +02:00
|
|
|
$ cd sub2
|
2014-12-02 19:49:23 +02:00
|
|
|
ENTERED: PWD:sub from:sub_linked to:sub2 event:enter
|
2014-11-29 14:56:28 +02:00
|
|
|
$ cd .
|