]> git.saurik.com Git - apple/ld64.git/blame - FireOpal/unit-tests/bin/fail-if-stdin.pl
ld64-85.2.1.tar.gz
[apple/ld64.git] / FireOpal / unit-tests / bin / fail-if-stdin.pl
CommitLineData
4f3e367c
A
1#!/usr/bin/perl -w
2
3#
4# Usage:
5#
6# command | ${FAIL_IF_STDIN}
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 exit 0;
19}
20
21printf("FAIL $test_name\n");
22exit 1;