FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OneShot-lgpl2.1.php
Go to the documentation of this file.
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2012 Hewlett-Packard Development Company, L.P.
4  SPDX-FileCopyrightText: © 2015 Siemens AG
5 
6  SPDX-License-Identifier: GPL-2.0-only
7 */
12 require_once ('CommonCliTest.php');
13 
19 {
27  public function testOneShotgplv21()
28  {
29  $gplv21 = dirname(dirname(dirname(dirname(__FILE__)))).'/testing/dataFiles/TestData/licenses/gplv2.1';
30  $this->assertFileExists($gplv21,"OneShotgplv21Test FAILURE! $gplv21 not found\n");
31 
32  list($output,) = $this->runNomos("",array($gplv21));
33  list(,$fname,,,$license) = explode(' ', $output);
34  $this->assertEquals($fname, 'gplv2.1', "Error filename $fname does not equal gplv2.1");
35  $this->assertEquals(trim($license), 'LGPL-2.1-only', "Error license does not equal LGPL_v2.1,
36  $license was returned");
37  }
38 }
Tests for common CLI operations.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Run one-shot license analysis on LGPL_v2.1 license.
testOneShotgplv21()
Run NOMOS on GPL_v2.1 license.
char * trim(char *ptext)
Trimming whitespace.
Definition: fossconfig.c:690
list_t type structure used to keep various lists. (e.g. there are multiple lists).
Definition: nomos.h:308