8 require_once (
'CommonCliTest.php');
31 $this->bsd = dirname(dirname(dirname(dirname(__FILE__)))).
'/testing/dataFiles/TestData/licenses/BSD_style_d.txt';
32 $this->assertFileExists($this->bsd,
"OneShotbsdTest FAILURE! $this->bsd not found\n");
34 $bsdlic =
"BSD-3-Clause";
35 list(,$fname,,,$license) = explode(
' ', $output);
36 $this->assertEquals($fname,
'BSD_style_d.txt',
"Error filename $fname does not equal BSD_style_d.txt");
37 $this->assertEquals(
trim($license), $bsdlic);
49 $this->bsd = dirname(dirname(dirname(dirname(__FILE__)))).
'/testing/dataFiles/TestData/licenses/DNSDigest.c';
50 $this->assertFileExists($this->bsd,
"OneShotbsdTest FAILURE! $this->bsd not found\n");
52 $bsdlic =
"Apache-2.0,BSD-style,GPL";
53 list(,$fname,,,$license) = explode(
' ', $output);
54 $this->assertEquals($fname,
'DNSDigest.c',
"Error filename $fname does not equal DNSDigest.c");
55 $this->assertEquals(
trim($license), $bsdlic);
Tests for common CLI operations.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Perform a one-shot license analysis on a file (include bsd license)
testOneShotBsd()
Run NOMOS on BSD style license.
testOneShotDnsdigest()
Run NOMOS on DNS digest.
char * trim(char *ptext)
Trimming whitespace.
list_t type structure used to keep various lists. (e.g. there are multiple lists).