1#!/bin/bash 2 3[ -f testing.sh ] && . testing.sh 4 5#testing "name" "command" "result" "infile" "stdin" 6 7mkdir attrs 8touch attrs/file 9setfattr -n user.empty attrs/file 10setfattr -n user.data -v hello attrs/file 11 12testing "" "getfattr attrs/file" \ 13 "# file: attrs/file\nuser.data\nuser.empty\n\n" "" "" 14testing "-d" "getfattr -d attrs/file" \ 15 "# file: attrs/file\nuser.data=\"hello\"\nuser.empty\n\n" "" "" 16testing "-n" "getfattr -n user.empty attrs/file" \ 17 "# file: attrs/file\nuser.empty\n\n" "" "" 18testing "-d -n" "getfattr -d -n user.data attrs/file" \ 19 "# file: attrs/file\nuser.data=\"hello\"\n\n" "" "" 20 21rm -rf attrs 22