1#!perl
2use strict;
3use Test::More tests => 1;
4use File::Basename 'dirname';
5use Spreadsheet::ReadSXC;
6
7my $d = dirname($0);
8my $sxc_file = "$d/t.sxc";
9
10open my $fh, '<', $sxc_file
11    or die "Couldn't read '$sxc_file': $!";
12binmode $fh;
13my $workbook_ref_from_fh = Spreadsheet::ReadSXC::read_sxc_fh($fh, { StrictErrors => 1 });
14my $workbook_ref = Spreadsheet::ReadSXC::read_sxc($sxc_file);
15
16is_deeply $workbook_ref_from_fh, $workbook_ref,
17    "Reading from FH is the same as reading from a file";
18