summaryrefslogtreecommitdiff
path: root/examples/before_and_after.sh
blob: 1ec3e73a95e0de5cabfd4822a922a2f7c39b907d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash

export DISPLAY=:0

compare_str() {
    echo -n "${1}: "
    if [ "${2}" = "${3}" ]; then
        echo "PASS"
    else
        echo "FAIL"
    fi
}
    

compare_str "version" "$(xrandr --version)" "$(./xrandr --version)"

compare_str "help" "$(xrandr --help 2>&1)" "$(./xrandr --help 2>&1)"

compare_str "basic status" "$(xrandr)" "$(./xrandr)"

compare_str "verbose status" "$(xrandr --verbose)" "$(./xrandr --verbose)"