19 require_once (
'CommonCliTest.php');
56 $this->affero1 = dirname(dirname(dirname(dirname(__FILE__)))).
'/testing/dataFiles/TestData/licenses/Affero-v1.0';
57 $this->affero3 = dirname(dirname(dirname(dirname(__FILE__)))).
'/testing/dataFiles/TestData/licenses/agpl-3.0.txt';
58 $this->assertFileExists($this->affero1,
"OneShotaffero1Test FAILURE! $this->affero1 not found\n");
59 $this->assertFileExists($this->affero3,
"OneShotaffero1Test FAILURE! $this->affero3 not found\n");
61 list($output,) = $this->
runNomos(
"",array($this->affero1));
62 list(,$fname1,,,$license1) = explode(
' ', $output);
63 $this->assertEquals($fname1,
'Affero-v1.0',
"Error processed filename $fname1 64 does not equal Affero-v1.0");
65 $this->assertEquals(
trim($license1),
'AGPL-1.0',
"Error license does not equal Affero_v1, 66 $license1 was returned");
68 list($out3,) = $this->
runNomos(
"",array($this->affero3));
69 list(,$fname,,,$license) = explode(
' ', $out3);
70 $this->assertEquals($fname,
'agpl-3.0.txt',
"Error processed filename $fname 71 does not equal agpl-3.0.txt");
72 $this->assertEquals(
trim($license),
'AGPL-3.0',
"Error license 73 does not equal Affero_v3, $license was returned");
Perform a one-shot license analysis on a affero 2 and 3 licenses.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Tests for common CLI operations.
testOneShotafferos()
Run NOMOS on affero1 and affero3.
list_t type structure used to keep various lists. (e.g. there are multiple lists).
char * trim(char *ptext)
Trimming whitespace.