FOSSology  3.2.0rc1
Open Source License Compliance by Open Source Software
OneShot-lgpl2.1.php
Go to the documentation of this file.
1 <?php
2 /***********************************************************
3  Copyright (C) 2012 Hewlett-Packard Development Company, L.P.
4  Copyright (C) 2015 Siemens AG
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License
8  version 2 as published by the Free Software Foundation.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License along
16  with this program; if not, write to the Free Software Foundation, Inc.,
17  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  ***********************************************************/
23 require_once ('CommonCliTest.php');
24 
30 {
38  public function testOneShotgplv21()
39  {
40  $gplv21 = dirname(dirname(dirname(dirname(__FILE__)))).'/testing/dataFiles/TestData/licenses/gplv2.1';
41  $this->assertFileExists($gplv21,"OneShotgplv21Test FAILURE! $gplv21 not found\n");
42 
43  list($output,) = $this->runNomos("",array($gplv21));
44  list(,$fname,,,$license) = explode(' ', $output);
45  $this->assertEquals($fname, 'gplv2.1', "Error filename $fname does not equal gplv2.1");
46  $this->assertEquals(trim($license), 'LGPL-2.1', "Error license does not equal LGPL_v2.1,
47  $license was returned");
48  }
49 }
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Tests for common CLI operations.
testOneShotgplv21()
Run NOMOS on GPL_v2.1 license.
Run one-shot license analysis on LGPL_v2.1 license.
list_t type structure used to keep various lists. (e.g. there are multiple lists).
Definition: nomos.h:321
char * trim(char *ptext)
Trimming whitespace.
Definition: fossconfig.c:695