20091205

test report - embedding bzipped tar in a bash script (with uuencode)

Just a quick note on the cunning technique used in the making of tag_test.sh.

The utility's both data store and main interface is file system - which makes it easy to think of diff'ing directory trees (actual to golden) as a means to test the former.

Now, I would generate a golden test directory tree, test it manually all I want, tar-bzip2 it, and uuencode the data for pasting as an in-place redirection block (<<EOF) - which is fed to uudecode and untar in the script, of course.
And I'd also repeat this operation for every test I wanted to perform.

The resulting bash code is rather fatty, but it is totally self-contained.

tag: the bash utility's major update

Although I have properly realised the truly versatile filesystem-based tagging-enabled environment is much further away than I originally thought, I've updated my simple bash mini-utility, and it is now as useful as ever. I've even creatively wrote some tests for it.
Dowload/Clone Here

p.s. Some thoughts on the ideal filesystem interface left out for a while.