blob: d94f480aef20eed50cf70a241e5cdd6983f79172 [file] [log] [blame] [edit]
#!/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" "" ""