view tests/dirname.test @ 1577:ac84a209cb05 draft

sed: c needs to trigger range logic like d, D works like d when there isn't anything left in the line, and more tests.
author Rob Landley <rob@landley.net>
date Thu, 27 Nov 2014 20:38:21 -0600
parents 8700cbe1cb29
children
line wrap: on
line source

#!/bin/bash

[ -f testing.sh ] && . testing.sh

#testing "name" "command" "result" "infile" "stdin"

testing "dirname /-only" "dirname ///////" "/\n" "" ""
testing "dirname trailing /" "dirname a//////" ".\n" "" ""
testing "dirname combined" "dirname /////a///b///c///d/////" "/////a///b///c\n" "" ""
testing "dirname /a/" "dirname /////a///" "/\n" "" ""