I want to create tests for a code which contains 'print' statements. For example:
Is there a way to eliminate 'foo' printing in the tests output, and, more important, to analyze information printed by the tested subroutine?#!/usr/bin/perl -w use strict; use Test::More qw(no_plan); ok(test_foo() eq "bar"); sub test_foo { print "foo"; return "bar"; } __OUTPUT__ foook 1 1..1
--dda
In reply to Tests for 'printing' code by dda
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |