Page MenuHomeFreeBSD

m4: Convert tests to ATF
ClosedPublic

Authored by des on Wed, Feb 4, 8:53 PM.
Tags
None
Referenced Files
F144993115: D55115.diff
Sat, Feb 14, 8:20 PM
Unknown Object (File)
Fri, Feb 13, 8:33 AM
Unknown Object (File)
Fri, Feb 13, 6:48 AM
Unknown Object (File)
Thu, Feb 12, 2:15 AM
Unknown Object (File)
Wed, Feb 11, 2:18 PM
Unknown Object (File)
Wed, Feb 11, 11:12 AM
Unknown Object (File)
Wed, Feb 11, 10:49 AM
Unknown Object (File)
Tue, Feb 10, 6:05 AM
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.