]> git.evergreen-ils.org Git - working/Evergreen.git/blob - Open-ILS/src/support-scripts/test-scripts/stream_importer_test.pl
LP#1796945 Reporter cloning and creation fixes
[working/Evergreen.git] / Open-ILS / src / support-scripts / test-scripts / stream_importer_test.pl
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4 use IO::Socket::INET;
5
6 # simple test to send an authority record to marc_stream_importer.pl
7
8 my $marc = '00208nz  a2200097o  45 0001001400000003000500014005001700019008004100036040001500077100001800092\1eIISGa11554924\1eIISG\1e20021207110052.0\1e021207n| acannaabn          |n aac     d\1e  \1faIISG\1fcIISG\1e\1faMaloy, Eileen\1e\1d';
9
10 my $socket = IO::Socket::INET->new(
11     PeerAddr => 'localhost',
12     PeerPort => 5544,
13     Proto    => 'tcp'
14 ) or die "socket failure $!\n";
15
16 $socket->print($marc) or die "socket print failure: $!\n";
17
18 while (chomp(my $line = $socket->getline)) {
19     print "Read: $line\n";
20 }
21