summaryrefslogtreecommitdiff
path: root/tests/030-xauth-extract.script
blob: 6db520fb5a0bc1d714e39e73bd710a276f3d0f2d (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
#!/bin/bash

# setup the test ennvironment inside this shell
. setup-sourced

# Execute the test
xauth add examplehost1/unix:0 . b90b0fd1cf6a0e7a2c74c00000000001
xauth add examplehost2/unix:0 . b90b0fd1cf6a0e7a2c74c00000000002
xauth add examplehost3/unix:0 . b90b0fd1cf6a0e7a2c74c00000000003

# Use xauth_silent because otherwise the system dependent paths are printed
XAUTHORITY2=$DATADIR/.Xauthority2
xauth_silent extract $XAUTHORITY2 examplehost2/unix:0
xauth_silent -f $XAUTHORITY2 list                    

XAUTHORITY3=$DATADIR/.Xauthority3
xauth_silent extract $XAUTHORITY3 examplehost3/unix:0
xauth_silent -f $XAUTHORITY3 list                    

rm $XAUTHORITY ; touch $XAUTHORITY
xauth_silent merge $XAUTHORITY2 $XAUTHORITY3
xauth list