summaryrefslogtreecommitdiff
path: root/tests/020-xauth-add-local.script
blob: 58d5b93310aaebe488df5e07e81da8a2177a9456 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# setup the test environment inside this shell
. ${srcdir:-.}/setup-sourced

# Execute the test
xauth add unix:0              . b90b0fd1cf6a0e7a2c74c00000000004
xauth add 127.0.0.1:1         . b90b0fd1cf6a0e7a2c74c00000000005
xauth add :2                  . b90b0fd1cf6a0e7a2c74c00000000006
xauth add :3.5                . b90b0fd1cf6a0e7a2c74c00000000007
xauth add :4                  . b90b0fd1cf6a0e7a2c74c00000000004

# List the number of entries added
xauth list | wc -l | xargs echo

# Try to match them and print cookie
xauth list unix:0        | awk '{print $3}'
xauth list 127.0.0.1:1   | awk '{print $3}'
xauth list 127.0.0.1:2   | awk '{print $3}'
xauth list 127.0.0.1:3.6 | awk '{print $3}'
xauth list :4            | awk '{print $3}'