FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OneShot-empty.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 */
14 require_once ('CommonCliTest.php');
15 
21 {
26  public $empty;
27 
35  public function testOneShotempty()
36  {
37  /* check to see if the file exists */
38  $this->empty = dirname(dirname(__FILE__)).'/testdata/empty';
39  $this->assertFileExists($this->empty,"OneShotemptyTest FAILURE! $this->empty not found\n");
40 
41  list($output,) = $this->runNomos("",array($this->empty));
42  list(,$fname,,,$license) = explode(' ', $output);
43  $this->assertEquals($fname, 'empty', "Error filename $fname does not equal empty");
44  $this->assertEquals(trim($license), 'No_license_found', "Error license does not
45  equal No_license_found, $license was returned");
46  }
47 }
Tests for common CLI operations.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Run a one-shot license test on an empty file.
testOneShotempty()
Run NOMOS on an empty file.
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