]> git.saurik.com Git - apple/ld64.git/blame - unit-tests/bin/pass-iff-no-stdin.pl
ld64-409.12.tar.gz
[apple/ld64.git] / unit-tests / bin / pass-iff-no-stdin.pl
CommitLineData
d696c285
A
1#!/usr/bin/perl -w
2
3#
4# Usage:
5#
6# command | ${PASS_IFF_EMPTY}
7#
8
9use strict;
10
11my $test_name = "";
12if ( exists $ENV{UNIT_TEST_NAME} ) {
13 $test_name = $ENV{UNIT_TEST_NAME};
14}
15
16if( eof STDIN )
17{
18 printf("PASS $test_name\n");
a61fdf0a 19 exit 0;
d696c285 20}
d696c285 21
a61fdf0a
A
22printf("FAIL $test_name\n");
23exit 1;