From: Eric Hodel Date: 2003-12-11T10:22:52-08:00 Subject: Re: Ideas for replacing $0==__FILE__ --KRJ4yArSHF8vY7I3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable jrb3@eidogen.com (jrb3@eidogen.com) wrote: > > Austin Ziegler wrote: >=20 > > I like that--in fact, I'd probably use it. What happens if there are > > multiple TEST{} blocks (especially in required files)? Do they all get > > executed? >=20 > I would not use TEST{} if required files executed any of their TEST{} > blocks under -t: there'd be no way to test just one file. This behavior of test/unit could be modified if TEST { } existed. The main idea TEST { } was as a replacement for if $0 =3D=3D __FILE__ when used for testing (like in some files in the Ruby standard library). It could be used for running unit tests, but I've found it easier to place them in their own files and run the tests separately. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --KRJ4yArSHF8vY7I3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQE/2LX8MypVHHlsnwQRAmvFAJ9Zf3JP9WTRaE6fbUDoSwOB7G8zAQCggZ5k /Qps7Tm0qV4MyeSkNA99ijw= =LPGe -----END PGP SIGNATURE----- --KRJ4yArSHF8vY7I3--