FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OneShot-Oracle-Berkeley-DB.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 */
13 require_once ('CommonCliTest.php');
14 
21 {
26  public $tested_file;
27 
36  {
37  /* Oracle-Berkeley-DB */
38  $oracleBDB_tested_file = dirname(dirname(dirname(__DIR__))).'/testing/dataFiles/TestData/licenses/Oracle-Berkeley-DB.java';
39  list($output,) = $this->runNomos("",array($oracleBDB_tested_file));
40  list(,,,,$licenseOBDB) = explode(' ', $output);
41  $this->assertEquals(trim($licenseOBDB), "Oracle-Berkeley-DB");
42 
43  /* sleepycat */
44  $sleepycatTested_file = dirname(dirname(dirname(__DIR__))).'/testing/dataFiles/TestData/licenses/sleepycat.php';
45  list($outputSc,) = $this->runNomos("",array($sleepycatTested_file));
46  list(,,,,$licenseSc) = explode(' ', $outputSc);
47  $this->assertEquals(trim($licenseSc), "Sleepycat");
48  }
49 }
Tests for common CLI operations.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Perform a one-shot license analysis on Oracle-Berkeley-DB and sleepycat license.
testOneShotOracle_Berkeley_DB()
Run NOMOS on license files.
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