FOSSology  4.4.0
Open Source License Compliance by Open Source Software
OneShot-JSON.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 {
24  public $tested_file;
25 
33  function testOneShot_JSON()
34  {
35  $this->tested_file = dirname(dirname(dirname(__DIR__))).'/testing/dataFiles/TestData/licenses/jslint.js';
36  $license_report = "JSON";
37 
38  list($output,) = $this->runNomos("",array($this->tested_file));
39  list(,,,,$license) = explode(' ', $output);
40  $this->assertEquals(trim($license), $license_report);
41  }
42 }
Tests for common CLI operations.
runNomos($args="", $files=array())
Run nomos using the arguments passed.
Run one-shot license analysis on JSON license.
testOneShot_JSON()
Run NOMOS on JSON 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