You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
330 B
13 lines
330 B
#!/bin/bash
|
|
|
|
[ -f testing.sh ] && . testing.sh
|
|
|
|
#testing "name" "command" "result" "infile" "stdin"
|
|
|
|
HOST="$(cat /proc/sys/kernel/hostname 2>/dev/null)"
|
|
skipnot [ $? -eq 0 ]
|
|
testing "get" "hostname" "$HOST\n" "" ""
|
|
|
|
skipnot [ $(id -u) -eq 0 ]
|
|
testing "set" 'hostname "2>&1 | tee"; hostname; hostname "$HOST"' "2>&1 | tee\n" "" ""
|