Page MenuHomeFreeBSD

m4: Convert tests to ATF
Needs ReviewPublic

Authored by des on Wed, Feb 4, 8:53 PM.

Details

Reviewers
None
Group Reviewers
Klara
Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 70428
Build 67311: arc lint + arc unit

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