1#!/bin/bash 2 3[ -f testing.sh ] && . testing.sh 4 5#testing "name" "command" "result" "infile" "stdin" 6 7testing "dirname /-only" "dirname ///////" "/\n" "" "" 8testing "dirname trailing /" "dirname a//////" ".\n" "" "" 9testing "dirname combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" "" 10testing "dirname /a/" "dirname /////a///" "/\n" "" "" 11