Page MenuHomeFreeBSD

m4: Convert tests to ATF
ClosedPublic

Authored by des on Wed, Feb 4, 8:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Feb 18, 12:53 PM
Unknown Object (File)
Wed, Feb 18, 12:53 PM
Unknown Object (File)
Wed, Feb 18, 11:36 AM
Unknown Object (File)
Wed, Feb 18, 11:35 AM
Unknown Object (File)
Wed, Feb 18, 10:57 AM
Unknown Object (File)
Tue, Feb 17, 9:37 PM
Unknown Object (File)
Tue, Feb 17, 7:19 PM
Unknown Object (File)
Tue, Feb 17, 6:56 PM
Subscribers

Details

Summary

MFC after: 1 week
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

des requested review of this revision.Wed, Feb 4, 8:53 PM

kind of dirty, but ig you could have another function for generating these testcases using eval:

define_test()
{
	name=$1
	shift
	args=$*

	eval "
${name}_head()
{
}
${name}_body()
{
	m4_test ${args} ${name}
}
"
}

# [...]

define_test eval
define_test ff_after_dnl
define_test gnueval -g
define_test gnuformat -g

# [...]
usr.bin/m4/tests/m4_test.sh
71

presumably?

kind of dirty, but ig you could have another function for generating these testcases using eval:

I did that for sbin/md5 and regretted it.

des marked an inline comment as done.Thu, Feb 5, 1:49 PM

It looks fine to me...

This revision is now accepted and ready to land.Sat, Feb 7, 6:07 PM
This revision was automatically updated to reflect the committed changes.