m4: convert to new stand-alone test process (#37723)
This commit is contained in:
parent
7d4b65491d
commit
031af84e90
@ -118,17 +118,18 @@ def configure_args(self):
|
|||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
def test(self):
|
def test_version(self):
|
||||||
spec_vers = str(self.spec.version)
|
"""ensure m4 version matches installed spec"""
|
||||||
reason = "test: ensuring m4 version is {0}".format(spec_vers)
|
m4 = which(self.prefix.bin.m4)
|
||||||
self.run_test(
|
out = m4("--version", output=str.split, error=str.split)
|
||||||
"m4", "--version", spec_vers, installed=True, purpose=reason, skip_missing=False
|
assert str(self.spec.version) in out
|
||||||
)
|
|
||||||
|
|
||||||
reason = "test: ensuring m4 example succeeds"
|
def test_hello(self):
|
||||||
|
"""ensure m4 hello example runs"""
|
||||||
test_data_dir = self.test_suite.current_test_data_dir
|
test_data_dir = self.test_suite.current_test_data_dir
|
||||||
hello_file = test_data_dir.join("hello.m4")
|
hello_file = test_data_dir.join("hello.m4")
|
||||||
|
m4 = which(self.prefix.bin.m4)
|
||||||
|
out = m4(hello_file, output=str.split, error=str.split)
|
||||||
|
|
||||||
expected = get_escaped_text_output(test_data_dir.join("hello.out"))
|
expected = get_escaped_text_output(test_data_dir.join("hello.out"))
|
||||||
self.run_test(
|
check_outputs(expected, out)
|
||||||
"m4", hello_file, expected, installed=True, purpose=reason, skip_missing=False
|
|
||||||
)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user