- t/10-vp-basics.t
#!/usr/bin/perl use Test::More; use strict; use warnings; use File::Spec; use lib File::Spec->catdir('t', 'lib'); use_ok('TestVantagePro'); my $vp = TestVantagePro->new('/dev/dummy-port'); isa_ok($vp, 'TestVantagePro'); isa_ok($vp, 'Davis::VantagePro'); isa_ok($vp, 'Davis'); my $port = $vp->device_port; $port->set_test_mode_active(1); $port->set_no_random_data(1); $port->lookclear("Hello\x0D\x0A"); my $resp = $vp->Receive(0.2); is($resp, "Hello\x0D\x0A"); done_testing();