view message_tie.pl @ 1622:d402aa53926c

Add test for bug 3092 written by Manuel K?nig
author Leandro Lucarella <llucax@gmail.com>
date Tue, 19 Oct 2010 19:18:23 -0300
parents 7269c8972179
children
line wrap: on
line source

#!/usr/bin/perl

use strict;
use warnings;

my $message_pattern = shift;
my $last_cmd;

while (<>) {
	if (/^(run|norun|compile|nocompile): (.*)/) {
		$last_cmd = $2;
	} elsif (/$message_pattern/) {
		print "$last_cmd\n$_\n";
	}
}