FOSSology  4.4.0
Open Source License Compliance by Open Source Software
desc.php
1 <?php
2 /*
3  SPDX-FileCopyrightText: © 2007 Hewlett-Packard Development Company, L.P.
4 
5  SPDX-License-Identifier: GPL-2.0-only
6 */
16 class TestDashD extends UnitTestCase
17 {
18 
19  public $command = '/usr/local/bin/test.cp2foss';
20 
21  function TestDesc()
22  {
23 
24  $output = array();
25  $error = exec("$this->command -p CP2fossTest -n foo -a /tmp/zlib.tar.bz2 -d \"a comment\"", $output, $retval);
26  //print_r($output);
27  $this->assertPattern('/Working on /', $output[0]);
28  $output = array();
29  // No description specified
30  $error = exec("$this->command -p foo -n Bar -a /tmp/zlib.tar.bz2", $output, $retval);
31  //print_r($output);
32  $this->assertPattern('/ERROR, -d /', $output[0]);
33  }
34 }
35