File: common.pl

package info (click to toggle)
cupt 2.10.4%2Bnmu2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,144 kB
  • sloc: cpp: 23,642; perl: 1,599; sh: 40; makefile: 19
file content (23 lines) | stat: -rw-r--r-- 488 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use CuptInteractive;

use strict;
use warnings;

sub get_shell {
	my $cupt = shift;
	return CuptInteractive->new("$cupt shell");
}

sub test_output_identical_with_non_shell {
	my ($cupt, $cupt_shell, $command, $base_command) = @_;
	$base_command //= $command;

	my $output_normal = stdall("$cupt $base_command");
	is($?, 0, 'command succeeded')
			or diag($output_normal);
	my $output_shell = $cupt_shell->execute($command);
	is($output_shell, $output_normal, "comparing output");
}

1;