-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On Sat, Nov 15, 2008 at 8:23 PM, Trent W. Buck wrote: > This bundle mostly looks good, and I'm in favour of abstracting the > swathes of boilerplate in tests/. > > Don't forget that tests migrate to and from bugs/, it would be good if > they didn't stop working because ". lib.sh" couldn't find ./lib.sh in > bugs/.
I don't really know how we would handle this. In my experimentation, something like '. ../lib' (or presumably '. ../tests/lib') didn't work reliably. We can't do a symbolic or hardlink from bugs/lib to tests/lib either since I don't believe darcs supports those filetypes. > [EMAIL PROTECTED] writes: >> Sat Nov 15 15:16:08 EST 2008 [EMAIL PROTECTED] >> * +tests/lib.sh: library for test scripts >> This adds a file to the tests directory for storing function definitions. This will cut down on silliness like 'not' being defined in 63 different scripts - the exact same way. > > Warning: you've supplied a long patch name. A concise patch name is > recommended, with discussion or elaboration in the patch description. > You can use "darcs amend --edit" to change this patch's description. > >> Sat Nov 15 15:18:47 EST 2008 [EMAIL PROTECTED] >> * tests/*.sh: factor out definitions of portable_pwd to lib.sh >> >> Sat Nov 15 15:57:35 EST 2008 [EMAIL PROTECTED] >> * tests/*.sh: factour out ~61 of the 'not' definitions to lib.sh > > Possible typo: did you mean "factor" instead of "factour"? > You can use "darcs amend --edit" to change this patch's description. > > I'm simulating the issue1094 patch name checker :-) After struggling for a while, it seems these patches are depended upon. Manually editing didn't work, and small issues of newlines and spelling didn't seem worth spending 10 or 20 minutes doing whatever sequence of pulls and unrecords and stuff would be necessary. >> [+tests/lib.sh: library for test scripts >> [EMAIL PROTECTED] >> Ignore-this: 639f1e602f31949f93daab6053793127 >> This adds a file to the tests directory for storing function definitions. This will cut down on silliness like 'not' being defined in 63 different scripts - the exact same way. >> ] addfile ./tests/lib.sh >> hunk ./tests/lib.sh 1 >> - >> +#!/usr/bin/env bash > > This is wrong; shell libraries should not declare shebangs. > Instead, I suggest something "# This is a -*- sh -*- library." Done. > You will also find that the test harness is running this script because > it ends in ".sh"; this is undesirable. You could either place it in > lib/, or just rename it lib.bash. Or, you could name it something like > 0-common.sh -- so that it sorts to the top in most locales -- and then > have the test harness only run files that start with [a-zA-Z]. I renamed it 'lib'. I don't see anything Bash-specific about it (nor does 'dash -n'), so no .bash suffix. > I also notice that you have "set -ev" in lib.sh, but have not removed > this from scripts. Done. I have also added some documentation on using lib. - -- gwern -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEAREKAAYFAkkhlOwACgkQvpDo5Pfl1oJLSACfQRVizJ2hfnWE77fBogGcQx/n 3WgAnjLk8885uEMHn9ELIllKq8czRBGt =pkI/ -----END PGP SIGNATURE----- _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
