Excel-Writer-XLSX-0.76/ 000755 000765 000024 00000000000 12260573500 014615 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/.travis.yml 000644 000765 000024 00000000126 12241403702 016720 0 ustar 00John staff 000000 000000 language: perl
perl:
- "5.18"
- "5.16"
- "5.14"
- "5.12"
- "5.10"
- "5.8"
Excel-Writer-XLSX-0.76/bin/ 000755 000765 000024 00000000000 12260573472 015375 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/Changes 000644 000765 000024 00000041407 12260572553 016125 0 ustar 00John staff 000000 000000 Revision history for Perl module Excel::Writer::XLSX.
+ New feature/improvement.
- Removed/deprecated feature.
! Bug fix.
0.75 2013-12-31
+ Added date axis handling to charts.
+ Added support for non-contiguous chart ranges.
! Fix to remove duplicate set_column() entries.
0.75 2013-12-02
+ Added interval unit option for category axes.
! Fix for axis name font rotation. Issue #83.
! Fix for several minor issues with Pie chart legends.
0.74 2013-11-17
! Improved defined name validation.
Issue #82.
+ Added set_title() option to turn off automatic title.
Issue #81.
+ Allow positioning of plotarea, legend, title and axis names.
Issue #80.
! Fix for modification of user params in condtional_formatting().
Issue #79.
! Fix for star style markers.
0.73 2013-11-08
+ Added custom error bar option to charts.
! Fix for tables added in non-sequential order.
! Fix for scatter charts with markers on non-marker series.
0.72 2013-08-28
! Fix for charts and images that cross rows and columns that are
hidden or formatted but which donтt have size changes.
0.71 2013-08-24
! Fixed issue in image handling.
! Added fix to ensure formula calculation on load regardless of
Excel version.
0.70 2013-07-30
! Fix for rendering images that are the same size as cell boundaries.
GitHub issue #70.
! Added fix for inaccurate column width calculation.
+ Added Chart line smoothing option.
0.69 2013-06-12
+ Added chart font rotation property. Mainly for use with date axes
to make the display more compact.
! Fix for 0 data in Worksheet Tables. #65.
Reported by David Gang.
0.68 2013-06-06
! Fix for issue where shapes on one worksheet corrupted charts on a
subsequent worksheet. #52.
! Fix for issue where add_button() invalidated cell comments in the
same workbook. #64.
0.67 2013-05-06
! Fix for set_selection() with cell range.
0.66 2013-04-12
! Fix for issue with image scaling.
0.65 2012-12-31
+ Added options to format series Gap/Overlap for Bar/Column charts.
0.64 2012-12-22
+ Added the option to format individual points in a chart series.
This allows Pie chart segments to be formatted.
0.63 2012-12-19
+ Added Chart data tools such as:
Error Bars
Up-Down Bars
High-Low Lines
Drop Lines.
See the chart_data_tool.pl example.
0.62 2012-12-12
+ Added option for adding a data table to a Chart X-axis.
See output from chart_data_table.pl example.
0.61 2012-12-11
+ Allow a cell url string to be over written with a number or formula
using a second write() call to the same cell. The url remains intact.
Issue #48.
+ Added set_default_row() method to set worksheet default values for
rows.
+ Added Chart set_size() method to set the chart dimensions.
0.60 2012-12-05
+ Added Excel form buttons via the worksheet insert_button() method.
This allows the user to tie the button to an embedded macro imported
using add_vba_project().
The portal to the dungeon dimensions is now fully open.
! Fix escaping of special character in URLs to write_url().
Issue #45.
! Fix for 0 access/modification date on vbaProject.bin files extracted
using extract_vba. The date isn't generally set correctly in the
source xlsm file but this caused issues on Windows.
0.59 2012-11-26
+ Added macro support via VBA projects extracted from existing Excel
xlsm files. User defined functions can be called from worksheets
and macros can be called by the user but they cannot, currently,
be linked to form elements such as buttons.
0.58 2012-11-23
+ Added chart area and plot area formatting.
0.57 2012-11-21
+ Add major and minor axis chart gridline formatting.
0.56 2012-11-18
! Fix for issue where chart creation order had to be the same
as the insertion order or charts would be out of sync.
Frederic Claude Sievert and Hurricup. Issue #42.
! Fixed issue where gridlines didn't work in Scatter and Stock
charts. Issue #41.
! Fixed default XML encoding to avoid/solve various issues with XML
encoding created by the XML changes in version 0.51. Issue #43.
0.55 2012-11-10
+ Added Sparklines.
! Fix for issue with "begins with" and "ends with" Conditional
Formatting. Issue #40.
0.54 2012-11-05
+ Added font manipulation to Charts.
+ Added number formats to Chart axes.
+ Added Radar Charts.
! Fix for XML encoding in write_url() internal/external
links. Issue #37.
0.53 2012-10-10
! Fix for broken MANIFEST file.
0.52 2012-10-09
! Added dependency on Date::Calc to xl_parse_date.t test.
Closes #30 and RT#79790.
! Fix for XML encoding of URLs. Closes #31.
+ Refactored XMLWriter into a single class. This breaks the last
remaining ties to XML::Writer to allow for future additions
and optimisations. Renamed methods for consistency.
0.51 2012-09-16
+ Speed optimisations.
This release contains a series of optimisations aimed
at increasing the speed of Excel::Writer::XLSX. The
overall improvement is around 66%.
See the SPEED AND MEMORY USAGE section of the documentation.
+ Memory usage optimisations.
This fixes an issue where the memory used for the worksheet
data tables was freed but then brought back into usage due
to the use of an array as the base data structure. This
meant that the memory usage still continued to grow with
large row counts.
! Added warning about Excel limit to 65,530 urls per worksheet.
! Limit URLs to Excel's limit of 255 chars. Fixes Issue #26.
! Fix for whitespace in urls. Fixes Issue #25.
! Fix for solid fill of type 'none' is chart series.
Closes issue #27 reported on Stack Overflow.
! Modified write_array_formula() to apply format over full range.
Fixes issue #18.
! Fix for issue with chart formula referring to non-existent sheet name.
It is now a fatal error to specify a chart series formula that
refers to an non-existent worksheet name. Fixes issue #17.
0.50 2012-09-09
+ Added option to add secondary axes to charts.
Thanks to Eric Johnson and to Foxtons for sponsoring the work.
+ Added add_table() method to add Excel tables to worksheets.
! Fix for right/left auto shape connection when destination
is left of source shape. Thanks to Dave Clarke for fix.
! Fix for issue #16. Format::copy() method not protecting values.
The Format copy() method over-writes certain new properties that
weren't in Spreadsheet::WriteExcel. This fixes the issue by
storing and restoring the properties during copy.
! Fix for issue #15: write_url with local sub directory.
Local sub-directories were incorrectly treated as
file:// external.
! Fix for for issue #14: Non-numeric data in chart value axes
are now converted to zero in chart data cache, as required
by Excel.
0.49 2012-07-12
+ Added show_blanks_as() chart method to control the display of
blank data.
+ Added show_hidden_data() chart method to control the display of
data in hidden rows and columns.
! Added fix for fg/bg colours in conditional formats which are
shared with cell formats.
Reported by Patryk Kwiatkowski.
! Fix for xl_parse_time() with hours > 24. Github issue #11.
! Fixed lc() warning in Utility.pm in recent perls. Github issue #10.
! Fixed issue with non-integer shape dimensions. Thanks Dave Clarke.
! Fixed error handling for shape connectors. Thanks Dave Clarke.
0.48 2012-06-25
+ Added worksheet shapes. A major new feature.
Patch, docs, tests and example programs by Dave Clarke.
+ Added stacked and percent_stacked chart subtypes to Area charts.
! Added fix for chart names in embedded charts.
Reported by Matt Freel.
! Fixed bug with Unicode characters in rich strings.
Reported by Michiel van Rhee.
0.47 2012-04-10
+ Additional conditional formatting options such as color, type and value
for 2_color_scale, 3_color_scale and data_bar. Added option for non-
contiguous data ranges as well.
+ Additional chart data label parameters such as position, leader lines
and percentage. Initial patch by George E. Tarrant III.
! Fixed for Autofilter filter_column() offset bug reported by
Krishna Rajendran.
! Fix for write_url() where url contains invalid whitespace, RT #75808,
reported by Oleg G. The write_url() method now throws a warning and
rejects the invalid url to avoid file corruption.
0.46 2012-02-10
! Fix for x-axis major/minor units in scatter charts.
Reported by Carey Drake.
0.45 2012-01-09
! Changed from File::Temp tempdir() to newdir() to cleanup the temp dir at
object destruction rather than the program exit. Also improved error
reporting when mkdir() fails.
Reported by Kevin Ruscoe.
! Fix to escape control characters in strings.
Reported by Kevin Ruscoe.
0.44 2012-01-05
! Fix for missing return value from Workbook::close() with filehandles.
RT 73724. Reported and patched by Charles Bailey.
! Fixed support special filename/filehandle '-'.
RT 73424. Reported by YuvalL and Charles Bailey.
! Fix for non-working reverse x_axis with Scatter charts.
Reported by Viqar Abbasi.
0.43 2011-12-18
+ Added chart axis label position option.
+ Added invert_if_negative option for chart series fills.
0.42 2011-12-17
! Fix for set_optimization() where first row isn't 0.
Reported by Giulio Orsero.
! Fix to preserve whitespace in inline strings.
Reported by Giulio Orsero.
0.41 2011-12-10
! Increased IO::File requirement to 1.14 to prevent taint issues on some
5.8.8/5.8.6 platforms.
0.40 2011-12-07
! Fix for unreadable xlsx files when generator program has -l on the
commandline or had redefined $/. Github issue #7.
Reported by John Riksten.
0.39 2011-12-03
! Fix for spurious Mac ._Makefile.PL in the distro which prevented
automated testing and installation. Github issue #5.
Reported by Tobias Oetiker.
! Fix for failing test sub_convert_date_time.t due to extra precision
on longdouble perls. RT #71762
Reported by Douglas Wilson.
0.38 2011-12-03
+ Backported from perl 5.10.0 to perl 5.8.2.
You are killing me guys. Killing me.
0.37 2011-12-02
+ Added additional axis options: minor and major units, log base
and axis crossing.
0.36 2011-11-29
+ Added "min" and "max" options to axis ranges via set_x_axis() and
set_y_axis.
0.35 2011-11-27
+ Added Scatter chart subtypes: markers_only (the default),
straight_with_markers, straight, smooth_with_markers and smooth.
0.34 2011-11-04
+ Added set_optimization() method to reduce memory usage for very large
data sets.
0.33 2011-10-28
+ Added addition conditional formatting types: cell, date, time_period,
text, average, duplicate, unique, top, bottom, blanks, no_blanks,
errors, no_errors, 2_color_scale, 3_color_scale, data_bar and formula.
0.32 2011-10-20
! Fix for format alignment bug.
Reported by Roderich Schupp.
0.31 2011-10-18
+ Added basic conditional formatting via the conditional_format()
Worksheet method. More conditional formatting types will follow.
+ Added conditional_format.pl example program.
0.30 2011-10-06
+ Added stacked and percent_stacked chart subtypes to Bar and Column
chart types.
0.29 2011-10-05
+ Added the merge_range_type() method for finer control over the types
written using merge_range().
0.28 2011-10-04
+ Added default write_formula() value for compatibility with Google docs.
+ Updated Example.pm docs with Excel 2007 images.
0.27 2011-10-02
+ Excel::Writer::XLSX is now 100% functionally and API compatible
with Spreadsheet::WriteExcel.
+ Added outlines and grouping functionality.
+ Added outline.pl and outline_collapsed.pl example programs.
0.26 2011-10-01
+ Added cell comment methods and options.
Thanks to Barry Downes for providing the interim functionality
+ Added comments1.pl and comments2.pl example programs.
0.25 2011-06-16
+ Added option to add defined names to workbooks and worksheets.
Added defined_name.pl example program.
! Fix for fit_to_pages() with zero values.
Reported by Aki Huttunen.
0.24 2011-06-11
+ Added data validation and data_validate.pl example.
+ Added the option to turn off data series in chart legends.
0.23 2011-05-26
! Fix for charts ranges containing empty values.
0.22 2011-05-22
+ Added 'reverse' option to set_x_axis() and set_y_axis() in
charts.
0.21 2011-05-11
! Fixed support for filehandles.
+ Added write_to_scalar.pl and filehandle.pl example programs.
0.20 2011-05-10
! Fix for programs running under taint mode.
+ Added set_tempdir().
! Fix for color formatting in chartsheets.
0.19 2011-05-05
+ Added new chart formatting options for line properties,
markers, trendlines and data labels. See Chart.pm.
+ Added partial support for insert_image().
+ Improved backward compatibility for deprecated methods
store_formula() and repeat_formula().
! Fixed missing formatting for array formulas.
Reported by Cyrille Gourves.
! Fixed issue with chart scaling that caused "unreadable content"
Excel error.
0.18 2011-04-07
+ Added set_properties() method to add document properties.
Added properties.pl and tests.
0.17 2011-04-04
+ Added charting feature. See Chart.pm.
! Fix for file corruption issue when there are more than 10 custom colours.
Reported by Brian R. Landy.
0.16 2011-03-04
! Clarified support for deprecated methods in documentation and added
backward compatible methods in some cases.
! Fix for center_horizontally() issue.
Reported by Giulio Orsero.
! Fix for number like strings getting written as strings instead of numbers.
Reported by Giulio Orsero.
0.15 2011-03-01
! Fix for issues with set_row() not passing on format to cells
in the row. Reported by Giulio Orsero.
! Fixes for related issue in set_column().
0.14 2011-02-26
+ Added write_rich_string() method to write a string with multiple
formats.
+ Added rich_strings.pl example program.
+ Added set_1904() method for dates with a 1904 epoch.
+ Added date_time.pl example program.
! Fixed issue where leading and trailing whitespace in cell strings
wasn't preserved.
0.13 2011-02-22
+ Added additional page setup methods:
set_zoom()
right_to_left()
hide_zero()
set_custom_color()
set_tab_color()
protect()
+ Added Cell property methods:
set_locked()
set_hidden()
+ Added example programs:
hide_sheet.pl
protection.pl
right_to_left.pl
tab_colors.pl
0.12 2011-02-19
+ Added set_selection() method for selecting cells.
0.11 2011-02-17
! Fix for temp dirs not been removed after xlsx file creation.
http://rt.cpan.org/Ticket/Display.html?id=65816
Reported by Andreas Koenig.
0.10 2011-02-17
+ Added freeze_panes() and split_panes().
+ Added panes.pl example program.
0.09 2011-02-13
+ Added write_url() for internal and external hyperlinks.
+ Added hyperlink1+2.pl example programs.
0.08 2011-02-03
+ Added autofilter(), column_filter() and column_filter_list() methods.
+ Added autofilter.pl example program.
0.07 2011-01-28
+ Added additional Page Setup methods.
set_page_view()
repeat_rows()
repeat_columns()
hide_gridlines()
print_row_col_headers()
print_area()
print_across()
fit_to_pages()
set_start_page()
set_print_scale()
set_h_pagebreaks()
set_v_pagebreaks()
+ Added headers.pl example program.
0.06 2011-01-19
! Added fix for XML characters in attributes.
Reported by John Roll.
+ Added initial Page Setup methods.
set_landscape()
set_portrait()
set_paper()
center_horizontally()
center_vertically()
set_margins()
set_header()
set_footer()
0.05 2011-01-04
+ Added support for array_formulas. See the docs for write_array_formula()
and the example program.
0.04 2011-01-03
+ Added merge_range() for merging cells. With tests and examples.
0.03 2011-01-03
+ Optimisations. The module is now 100% faster.
0.02 2010-10-12
! Fixed dependencies in Makefile.
0.01 2010-10-11
First CPAN release.
Excel-Writer-XLSX-0.76/examples/ 000755 000765 000024 00000000000 12260573500 016433 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/lib/ 000755 000765 000024 00000000000 12260573467 015377 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/Makefile.PL 000644 000765 000024 00000002762 12241403702 016571 0 ustar 00John staff 000000 000000 #!/usr/bin/perl
use ExtUtils::MakeMaker;
use strict;
use warnings;
require 5.008002;
my %deps = (
'Archive::Zip' => 1.30,
'IO::File' => 1.14,
'File::Temp' => 0.19,
);
my %resources = (
homepage => 'http://jmcnamara.github.com/excel-writer-xlsx/',
repository => 'http://github.com/jmcnamara/excel-writer-xlsx',
bugtracker => 'http://github.com/jmcnamara/excel-writer-xlsx/issues',
MailingList => 'http://groups.google.com/group/spreadsheet-writeexcel',
);
my %params = (
'AUTHOR' => 'John McNamara (jmcnamara@cpan.org)',
'ABSTRACT' => 'Create a new file in the Excel 2007+ XLSX format.',
'NAME' => 'Excel::Writer::XLSX',
'VERSION_FROM' => 'lib/Excel/Writer/XLSX.pm',
'NEEDS_LINKING' => 0,
'dist' => { COMPRESS => 'gzip --best', SUFFIX => 'gz' },
'PREREQ_PM' => \%deps,
'EXE_FILES' => ['bin/extract_vba'],
'test' => { TESTS => 't/*/*.t t/*/*/*.t' }
);
if ( $ExtUtils::MakeMaker::VERSION ge '6.46' ) {
$params{META_MERGE} = { resources => \%resources };
}
if ( $ExtUtils::MakeMaker::VERSION ge '6.30_01' ) {
$params{LICENSE} = 'perl';
}
WriteMakefile(%params);
###############################################################################
#
# Additional target for Excel::Writer::XLSX:
# mydocs: make the Examples.pm doc.
#
sub MY::postamble {
"mydocs:\n"
. "\tperl -Mblib examples/gen_examples_pod.pl examples "
. "> lib/Excel/Writer/XLSX/Examples.pm\n\n";
}
Excel-Writer-XLSX-0.76/MANIFEST 000644 000765 000024 00000132460 12260573500 015754 0 ustar 00John staff 000000 000000 .travis.yml
Changes
MANIFEST
Makefile.PL
README
bin/extract_vba
examples/README
examples/a_simple.pl
examples/array_formula.pl
examples/autofilter.pl
examples/bug_report.pl
examples/cgi.pl
examples/chart_area.pl
examples/chart_bar.pl
examples/chart_column.pl
examples/chart_data_table.pl
examples/chart_data_tools.pl
examples/chart_line.pl
examples/chart_pie.pl
examples/chart_radar.pl
examples/chart_scatter.pl
examples/chart_secondary_axis.pl
examples/chart_stock.pl
examples/colors.pl
examples/comments1.pl
examples/comments2.pl
examples/conditional_format.pl
examples/data_validate.pl
examples/date_time.pl
examples/defined_name.pl
examples/demo.pl
examples/diag_border.pl
examples/filehandle.pl
examples/formats.pl
examples/gen_examples_pod.pl
examples/headers.pl
examples/hide_row_col.pl
examples/hide_sheet.pl
examples/hyperlink1.pl
examples/hyperlink2.pl
examples/indent.pl
examples/macros.pl
examples/merge1.pl
examples/merge2.pl
examples/merge3.pl
examples/merge4.pl
examples/merge5.pl
examples/merge6.pl
examples/mod_perl1.pl
examples/mod_perl2.pl
examples/outline.pl
examples/outline_collapsed.pl
examples/panes.pl
examples/properties.pl
examples/protection.pl
examples/regions.pl
examples/republic.png
examples/rich_strings.pl
examples/right_to_left.pl
examples/sales.pl
examples/shape1.pl
examples/shape2.pl
examples/shape3.pl
examples/shape4.pl
examples/shape5.pl
examples/shape6.pl
examples/shape7.pl
examples/shape8.pl
examples/shape_all.pl
examples/sparklines1.pl
examples/sparklines2.pl
examples/stats.pl
examples/stats_ext.pl
examples/stocks.pl
examples/tab_colors.pl
examples/tables.pl
examples/unicode_2022_jp.pl
examples/unicode_2022_jp.txt
examples/unicode_8859_11.pl
examples/unicode_8859_11.txt
examples/unicode_8859_7.pl
examples/unicode_8859_7.txt
examples/unicode_big5.pl
examples/unicode_big5.txt
examples/unicode_cp1251.pl
examples/unicode_cp1251.txt
examples/unicode_cp1256.pl
examples/unicode_cp1256.txt
examples/unicode_cyrillic.pl
examples/unicode_koi8r.pl
examples/unicode_koi8r.txt
examples/unicode_polish_utf8.pl
examples/unicode_polish_utf8.txt
examples/unicode_shift_jis.pl
examples/unicode_shift_jis.txt
examples/vbaProject.bin
examples/write_handler1.pl
examples/write_handler2.pl
examples/write_handler3.pl
examples/write_handler4.pl
examples/write_to_scalar.pl
lib/Excel/Writer/XLSX.pm
lib/Excel/Writer/XLSX/Chart.pm
lib/Excel/Writer/XLSX/Chart/Area.pm
lib/Excel/Writer/XLSX/Chart/Bar.pm
lib/Excel/Writer/XLSX/Chart/Column.pm
lib/Excel/Writer/XLSX/Chart/Line.pm
lib/Excel/Writer/XLSX/Chart/Pie.pm
lib/Excel/Writer/XLSX/Chart/Radar.pm
lib/Excel/Writer/XLSX/Chart/Scatter.pm
lib/Excel/Writer/XLSX/Chart/Stock.pm
lib/Excel/Writer/XLSX/Chartsheet.pm
lib/Excel/Writer/XLSX/Drawing.pm
lib/Excel/Writer/XLSX/Examples.pm
lib/Excel/Writer/XLSX/Format.pm
lib/Excel/Writer/XLSX/Package/App.pm
lib/Excel/Writer/XLSX/Package/Comments.pm
lib/Excel/Writer/XLSX/Package/ContentTypes.pm
lib/Excel/Writer/XLSX/Package/Core.pm
lib/Excel/Writer/XLSX/Package/Packager.pm
lib/Excel/Writer/XLSX/Package/Relationships.pm
lib/Excel/Writer/XLSX/Package/SharedStrings.pm
lib/Excel/Writer/XLSX/Package/Styles.pm
lib/Excel/Writer/XLSX/Package/Table.pm
lib/Excel/Writer/XLSX/Package/Theme.pm
lib/Excel/Writer/XLSX/Package/VML.pm
lib/Excel/Writer/XLSX/Package/XMLwriter.pm
lib/Excel/Writer/XLSX/Shape.pm
lib/Excel/Writer/XLSX/Utility.pm
lib/Excel/Writer/XLSX/Workbook.pm
lib/Excel/Writer/XLSX/Worksheet.pm
t/chart/area/sub_write_xml_declaration.t
t/chart/bar/sub_write_bar_dir.t
t/chart/bar/sub_write_grouping.t
t/chart/bar/sub_write_xml_declaration.t
t/chart/column/sub_write_xml_declaration.t
t/chart/line/sub_write_xml_declaration.t
t/chart/pie/sub_write_xml_declaration.t
t/chart/scatter/sub_write_xml_declaration.t
t/chart/stock/sub_write_xml_declaration.t
t/chart/sub_add_series.t
t/chart/sub_process_names.t
t/chart/sub_write_a_latin.t
t/chart/sub_write_auto.t
t/chart/sub_write_ax_id.t
t/chart/sub_write_ax_pos.t
t/chart/sub_write_chart_space.t
t/chart/sub_write_cross_ax.t
t/chart/sub_write_crosses.t
t/chart/sub_write_d_lbls.t
t/chart/sub_write_format_code.t
t/chart/sub_write_idx.t
t/chart/sub_write_label_align.t
t/chart/sub_write_label_offset.t
t/chart/sub_write_lang.t
t/chart/sub_write_layout.t
t/chart/sub_write_legend.t
t/chart/sub_write_legend_pos.t
t/chart/sub_write_major_gridlines.t
t/chart/sub_write_marker.t
t/chart/sub_write_marker_size.t
t/chart/sub_write_marker_value.t
t/chart/sub_write_num_cache.t
t/chart/sub_write_number_format.t
t/chart/sub_write_order.t
t/chart/sub_write_orientation.t
t/chart/sub_write_page_margins.t
t/chart/sub_write_page_setup.t
t/chart/sub_write_plot_vis_only.t
t/chart/sub_write_pt.t
t/chart/sub_write_pt_count.t
t/chart/sub_write_series_formula.t
t/chart/sub_write_style.t
t/chart/sub_write_symbol.t
t/chart/sub_write_tick_lbl_pos.t
t/chart/sub_write_v.t
t/chart/sub_write_xml_declaration.t
t/chartsheet/chartsheet01.t
t/chartsheet/chartsheet_subs.t
t/chartsheet/sub_write_xml_declaration.t
t/drawing/drawing_chart_01.t
t/drawing/drawing_image_01.t
t/drawing/drawing_shape_01.t
t/drawing/drawing_shape_02.t
t/drawing/drawing_shape_03.t
t/drawing/drawing_shape_04.t
t/drawing/drawing_shape_05.t
t/drawing/drawing_shape_06.t
t/drawing/drawing_shape_07.t
t/drawing/drawing_shape_08.t
t/drawing/sub_write_a_graphic_frame_locks.t
t/drawing/sub_write_c_chart.t
t/drawing/sub_write_c_nv_graphic_frame_pr.t
t/drawing/sub_write_c_nv_pr.t
t/drawing/sub_write_col.t
t/drawing/sub_write_col_off.t
t/drawing/sub_write_ext.t
t/drawing/sub_write_pos.t
t/drawing/sub_write_row.t
t/drawing/sub_write_row_off.t
t/drawing/sub_write_xfrm_extension.t
t/drawing/sub_write_xfrm_offset.t
t/drawing/sub_write_xml_declaration.t
t/lib/TestFunctions.pm
t/package/app/app01.t
t/package/app/app02.t
t/package/app/app03.t
t/package/app/sub_write_xml_declaration.t
t/package/comments/comments_01.t
t/package/comments/sub_write_text_t.t
t/package/comments/sub_write_xml_declaration.t
t/package/content_types/content_types.t
t/package/content_types/sub_write_default.t
t/package/content_types/sub_write_override.t
t/package/content_types/sub_write_xml_declaration.t
t/package/core/core01.t
t/package/core/core02.t
t/package/core/sub_write_xml_declaration.t
t/package/relationships/relationships.t
t/package/relationships/sheet_rels.t
t/package/relationships/sub_write_xml_declaration.t
t/package/shared_strings/shared_strings01.t
t/package/shared_strings/shared_strings02.t
t/package/shared_strings/sub_write_si.t
t/package/shared_strings/sub_write_sst.t
t/package/shared_strings/sub_write_xml_declaration.t
t/package/styles/styles_01.t
t/package/styles/styles_02.t
t/package/styles/styles_03.t
t/package/styles/styles_04.t
t/package/styles/styles_05.t
t/package/styles/styles_06.t
t/package/styles/styles_07.t
t/package/styles/styles_08.t
t/package/styles/styles_09.t
t/package/styles/sub_write_border.t
t/package/styles/sub_write_borders.t
t/package/styles/sub_write_cell_style.t
t/package/styles/sub_write_cell_style_xfs.t
t/package/styles/sub_write_cell_styles.t
t/package/styles/sub_write_cell_xfs.t
t/package/styles/sub_write_colors.t
t/package/styles/sub_write_default_fill.t
t/package/styles/sub_write_dxfs.t
t/package/styles/sub_write_fills.t
t/package/styles/sub_write_font.t
t/package/styles/sub_write_fonts.t
t/package/styles/sub_write_mru_colors.t
t/package/styles/sub_write_num_fmt.t
t/package/styles/sub_write_num_fmts.t
t/package/styles/sub_write_style_sheet.t
t/package/styles/sub_write_style_xf.t
t/package/styles/sub_write_xf.t
t/package/styles/sub_write_xml_declaration.t
t/package/table/sub_write_auto_filter.t
t/package/table/sub_write_table_column.t
t/package/table/sub_write_table_style_info.t
t/package/table/sub_write_xml_declaration.t
t/package/table/table01.t
t/package/table/table02.t
t/package/table/table03.t
t/package/table/table04.t
t/package/table/table05.t
t/package/table/table06.t
t/package/table/table07.t
t/package/table/table08.t
t/package/table/table09.t
t/package/table/table10.t
t/package/table/table11.t
t/package/table/table12.t
t/package/vml/sub_write_anchor.t
t/package/vml/sub_write_auto_fill.t
t/package/vml/sub_write_column.t
t/package/vml/sub_write_div.t
t/package/vml/sub_write_fill.t
t/package/vml/sub_write_idmap.t
t/package/vml/sub_write_move_with_cells.t
t/package/vml/sub_write_path.t
t/package/vml/sub_write_row.t
t/package/vml/sub_write_shadow.t
t/package/vml/sub_write_shapelayout.t
t/package/vml/sub_write_shapetype.t
t/package/vml/sub_write_size_with_cells.t
t/package/vml/sub_write_stroke.t
t/package/vml/sub_write_textbox.t
t/package/vml/vml_01.t
t/package/vml/vml_02.t
t/package/xml_writer/sub_write_xml_declaration.t
t/regression/array_formula01.t
t/regression/array_formula02.t
t/regression/autofilter00.t
t/regression/autofilter01.t
t/regression/autofilter02.t
t/regression/autofilter03.t
t/regression/autofilter04.t
t/regression/autofilter05.t
t/regression/autofilter06.t
t/regression/autofilter07.t
t/regression/button01.t
t/regression/button02.t
t/regression/button03.t
t/regression/button04.t
t/regression/button05.t
t/regression/button06.t
t/regression/button07.t
t/regression/button08.t
t/regression/button09.t
t/regression/button10.t
t/regression/button11.t
t/regression/button12.t
t/regression/chart_area01.t
t/regression/chart_area02.t
t/regression/chart_area03.t
t/regression/chart_area04.t
t/regression/chart_axis01.t
t/regression/chart_axis02.t
t/regression/chart_axis03.t
t/regression/chart_axis04.t
t/regression/chart_axis05.t
t/regression/chart_axis06.t
t/regression/chart_axis07.t
t/regression/chart_axis08.t
t/regression/chart_axis09.t
t/regression/chart_axis10.t
t/regression/chart_axis11.t
t/regression/chart_axis12.t
t/regression/chart_axis13.t
t/regression/chart_axis14.t
t/regression/chart_axis15.t
t/regression/chart_axis16.t
t/regression/chart_axis17.t
t/regression/chart_axis18.t
t/regression/chart_axis19.t
t/regression/chart_axis20.t
t/regression/chart_axis21.t
t/regression/chart_axis22.t
t/regression/chart_axis23.t
t/regression/chart_axis24.t
t/regression/chart_axis25.t
t/regression/chart_axis26.t
t/regression/chart_axis27.t
t/regression/chart_axis28.t
t/regression/chart_axis29.t
t/regression/chart_axis30.t
t/regression/chart_axis31.t
t/regression/chart_axis32.t
t/regression/chart_axis33.t
t/regression/chart_axis34.t
t/regression/chart_bar01.t
t/regression/chart_bar02.t
t/regression/chart_bar03.t
t/regression/chart_bar04.t
t/regression/chart_bar05.t
t/regression/chart_bar06.t
t/regression/chart_bar07.t
t/regression/chart_bar08.t
t/regression/chart_bar09.t
t/regression/chart_bar10.t
t/regression/chart_bar11.t
t/regression/chart_bar12.t
t/regression/chart_bar13.t
t/regression/chart_bar14.t
t/regression/chart_bar15.t
t/regression/chart_bar16.t
t/regression/chart_bar17.t
t/regression/chart_bar18.t
t/regression/chart_bar19.t
t/regression/chart_bar20.t
t/regression/chart_bar21.t
t/regression/chart_bar22.t
t/regression/chart_bar23.t
t/regression/chart_bar24.t
t/regression/chart_blank01.t
t/regression/chart_blank02.t
t/regression/chart_blank03.t
t/regression/chart_blank04.t
t/regression/chart_blank05.t
t/regression/chart_blank06.t
t/regression/chart_chartarea01.t
t/regression/chart_chartarea02.t
t/regression/chart_chartarea03.t
t/regression/chart_chartarea04.t
t/regression/chart_chartarea05.t
t/regression/chart_column01.t
t/regression/chart_column02.t
t/regression/chart_column03.t
t/regression/chart_column04.t
t/regression/chart_column05.t
t/regression/chart_column06.t
t/regression/chart_column07.t
t/regression/chart_column08.t
t/regression/chart_crossing01.t
t/regression/chart_crossing02.t
t/regression/chart_crossing03.t
t/regression/chart_crossing04.t
t/regression/chart_date01.t
t/regression/chart_date02.t
t/regression/chart_date03.t
t/regression/chart_date04.t
t/regression/chart_drop_lines01.t
t/regression/chart_drop_lines02.t
t/regression/chart_drop_lines03.t
t/regression/chart_drop_lines04.t
t/regression/chart_errorbars01.t
t/regression/chart_errorbars02.t
t/regression/chart_errorbars03.t
t/regression/chart_errorbars04.t
t/regression/chart_errorbars05.t
t/regression/chart_errorbars06.t
t/regression/chart_errorbars07.t
t/regression/chart_errorbars08.t
t/regression/chart_errorbars09.t
t/regression/chart_errorbars10.t
t/regression/chart_font01.t
t/regression/chart_font02.t
t/regression/chart_font03.t
t/regression/chart_font04.t
t/regression/chart_font05.t
t/regression/chart_font06.t
t/regression/chart_font07.t
t/regression/chart_font08.t
t/regression/chart_font09.t
t/regression/chart_format01.t
t/regression/chart_format02.t
t/regression/chart_format03.t
t/regression/chart_format04.t
t/regression/chart_format05.t
t/regression/chart_format06.t
t/regression/chart_format07.t
t/regression/chart_format08.t
t/regression/chart_format09.t
t/regression/chart_format10.t
t/regression/chart_format11.t
t/regression/chart_format12.t
t/regression/chart_format13.t
t/regression/chart_format14.t
t/regression/chart_format15.t
t/regression/chart_format16.t
t/regression/chart_format17.t
t/regression/chart_format18.t
t/regression/chart_gap01.t
t/regression/chart_gap02.t
t/regression/chart_gap03.t
t/regression/chart_gridlines01.t
t/regression/chart_gridlines02.t
t/regression/chart_gridlines03.t
t/regression/chart_gridlines04.t
t/regression/chart_gridlines05.t
t/regression/chart_gridlines06.t
t/regression/chart_gridlines07.t
t/regression/chart_gridlines08.t
t/regression/chart_gridlines09.t
t/regression/chart_high_low_lines01.t
t/regression/chart_high_low_lines02.t
t/regression/chart_layout01.t
t/regression/chart_layout02.t
t/regression/chart_layout03.t
t/regression/chart_layout04.t
t/regression/chart_layout05.t
t/regression/chart_layout06.t
t/regression/chart_layout07.t
t/regression/chart_layout08.t
t/regression/chart_legend01.t
t/regression/chart_legend02.t
t/regression/chart_line01.t
t/regression/chart_line02.t
t/regression/chart_line03.t
t/regression/chart_line04.t
t/regression/chart_name01.t
t/regression/chart_name02.t
t/regression/chart_name03.t
t/regression/chart_order01.t
t/regression/chart_order02.t
t/regression/chart_order03.t
t/regression/chart_pie01.t
t/regression/chart_pie02.t
t/regression/chart_pie03.t
t/regression/chart_pie04.t
t/regression/chart_points01.t
t/regression/chart_points02.t
t/regression/chart_points03.t
t/regression/chart_points04.t
t/regression/chart_points05.t
t/regression/chart_points06.t
t/regression/chart_radar01.t
t/regression/chart_radar02.t
t/regression/chart_radar03.t
t/regression/chart_scatter01.t
t/regression/chart_scatter02.t
t/regression/chart_scatter03.t
t/regression/chart_scatter04.t
t/regression/chart_scatter05.t
t/regression/chart_scatter06.t
t/regression/chart_scatter07.t
t/regression/chart_scatter08.t
t/regression/chart_scatter09.t
t/regression/chart_scatter10.t
t/regression/chart_scatter11.t
t/regression/chart_scatter12.t
t/regression/chart_scatter13.t
t/regression/chart_scatter14.t
t/regression/chart_size01.t
t/regression/chart_size02.t
t/regression/chart_size03.t
t/regression/chart_sparse01.t
t/regression/chart_stock01.t
t/regression/chart_stock02.t
t/regression/chart_str01.t
t/regression/chart_str02.t
t/regression/chart_table01.t
t/regression/chart_table02.t
t/regression/chart_title01.t
t/regression/chart_title02.t
t/regression/chart_up_down_bars01.t
t/regression/chart_up_down_bars02.t
t/regression/chart_up_down_bars03.t
t/regression/chartsheet01.t
t/regression/chartsheet02.t
t/regression/chartsheet03.t
t/regression/chartsheet04.t
t/regression/chartsheet05.t
t/regression/chartsheet06.t
t/regression/chartsheet07.t
t/regression/chartsheet08.t
t/regression/chartsheet09.t
t/regression/comment01.t
t/regression/comment02.t
t/regression/comment03.t
t/regression/comment04.t
t/regression/comment05.t
t/regression/comment06.t
t/regression/comment07.t
t/regression/comment08.t
t/regression/comment09.t
t/regression/comment10.t
t/regression/comment11.t
t/regression/comment12.t
t/regression/cond_format01.t
t/regression/cond_format02.t
t/regression/cond_format03.t
t/regression/cond_format04.t
t/regression/cond_format05.t
t/regression/cond_format06.t
t/regression/cond_format07.t
t/regression/cond_format08.t
t/regression/cond_format09.t
t/regression/cond_format10.t
t/regression/cond_format11.t
t/regression/cond_format12.t
t/regression/cond_format13.t
t/regression/custom_colors01.t
t/regression/date_1904_01.t
t/regression/date_1904_02.t
t/regression/date_examples01.t
t/regression/default_row01.t
t/regression/default_row02.t
t/regression/default_row03.t
t/regression/default_row04.t
t/regression/defined_name01.t
t/regression/defined_name02.t
t/regression/defined_name03.t
t/regression/defined_name04.t
t/regression/escapes01.t
t/regression/escapes02.t
t/regression/escapes03.t
t/regression/escapes04.t
t/regression/escapes05.t
t/regression/escapes06.t
t/regression/escapes07.t
t/regression/escapes08.t
t/regression/filehandle01.t
t/regression/firstsheet01.t
t/regression/fit_to_page01.t
t/regression/fit_to_page02.t
t/regression/fit_to_page03.t
t/regression/fit_to_page04.t
t/regression/fit_to_page05.t
t/regression/format01.t
t/regression/format02.t
t/regression/format03.t
t/regression/format04.t
t/regression/format05.t
t/regression/gridlines01.t
t/regression/hide01.t
t/regression/hyperlink01.t
t/regression/hyperlink02.t
t/regression/hyperlink03.t
t/regression/hyperlink04.t
t/regression/hyperlink05.t
t/regression/hyperlink06.t
t/regression/hyperlink07.t
t/regression/hyperlink08.t
t/regression/hyperlink09.t
t/regression/hyperlink10.t
t/regression/hyperlink11.t
t/regression/hyperlink12.t
t/regression/hyperlink13.t
t/regression/hyperlink14.t
t/regression/hyperlink15.t
t/regression/hyperlink16.t
t/regression/hyperlink17.t
t/regression/hyperlink18.t
t/regression/hyperlink19.t
t/regression/hyperlink20.t
t/regression/image01.t
t/regression/image02.t
t/regression/image03.t
t/regression/image04.t
t/regression/image05.t
t/regression/image06.t
t/regression/image07.t
t/regression/image08.t
t/regression/image09.t
t/regression/image10.t
t/regression/image11.t
t/regression/image12.t
t/regression/image13.t
t/regression/image14.t
t/regression/image15.t
t/regression/image16.t
t/regression/image17.t
t/regression/image18.t
t/regression/image19.t
t/regression/images/blue.jpg
t/regression/images/blue.png
t/regression/images/grey.jpg
t/regression/images/grey.png
t/regression/images/issue32.png
t/regression/images/logo.png
t/regression/images/mylogo.png
t/regression/images/red.bmp
t/regression/images/red.jpg
t/regression/images/red.png
t/regression/images/red_64x20.png
t/regression/images/train.jpg
t/regression/images/yellow.jpg
t/regression/images/yellow.png
t/regression/macro01.t
t/regression/optimize01.t
t/regression/optimize02.t
t/regression/optimize03.t
t/regression/optimize04.t
t/regression/optimize05.t
t/regression/optimize06.t
t/regression/optimize07.t
t/regression/optimize08.t
t/regression/outline01.t
t/regression/outline02.t
t/regression/outline03.t
t/regression/outline04.t
t/regression/outline05.t
t/regression/outline06.t
t/regression/page_breaks01.t
t/regression/page_breaks02.t
t/regression/page_breaks03.t
t/regression/page_breaks04.t
t/regression/page_breaks05.t
t/regression/page_breaks06.t
t/regression/page_view01.t
t/regression/panes01.t
t/regression/print_across01.t
t/regression/print_area01.t
t/regression/print_area02.t
t/regression/print_area03.t
t/regression/print_area04.t
t/regression/print_area05.t
t/regression/print_area06.t
t/regression/print_area07.t
t/regression/print_options01.t
t/regression/print_options02.t
t/regression/print_options03.t
t/regression/print_options04.t
t/regression/print_options05.t
t/regression/print_options06.t
t/regression/print_scale01.t
t/regression/print_scale02.t
t/regression/properties01.t
t/regression/protect01.t
t/regression/protect02.t
t/regression/protect03.t
t/regression/repeat01.t
t/regression/repeat02.t
t/regression/repeat03.t
t/regression/repeat04.t
t/regression/repeat05.t
t/regression/rich_string01.t
t/regression/rich_string02.t
t/regression/rich_string03.t
t/regression/rich_string04.t
t/regression/rich_string05.t
t/regression/rich_string06.t
t/regression/rich_string07.t
t/regression/rich_string08.t
t/regression/rich_string09.t
t/regression/rich_string10.t
t/regression/rich_string11.t
t/regression/rich_string12.t
t/regression/row_col_format01.t
t/regression/row_col_format02.t
t/regression/row_col_format03.t
t/regression/row_col_format04.t
t/regression/row_col_format05.t
t/regression/row_col_format06.t
t/regression/row_col_format07.t
t/regression/row_col_format08.t
t/regression/row_col_format09.t
t/regression/row_col_format10.t
t/regression/row_col_format11.t
t/regression/row_col_format12.t
t/regression/row_col_format13.t
t/regression/row_col_format14.t
t/regression/selection01.t
t/regression/selection02.t
t/regression/set_column01.t
t/regression/set_column02.t
t/regression/set_column03.t
t/regression/set_column04.t
t/regression/set_column05.t
t/regression/set_column06.t
t/regression/set_column07.t
t/regression/set_column08.t
t/regression/set_column09.t
t/regression/set_print_scale01.t
t/regression/set_start_page01.t
t/regression/shape01.t
t/regression/shape02.t
t/regression/shape03.t
t/regression/shape04.t
t/regression/shape_connect01.t
t/regression/shape_connect02.t
t/regression/shape_connect03.t
t/regression/shape_connect04.t
t/regression/shape_scale01.t
t/regression/shape_stencil01.t
t/regression/shared_strings01.t
t/regression/shared_strings02.t
t/regression/simple01.t
t/regression/simple02.t
t/regression/simple03.t
t/regression/simple04.t
t/regression/simple05.t
t/regression/tab_color01.t
t/regression/table01.t
t/regression/table02.t
t/regression/table03.t
t/regression/table04.t
t/regression/table05.t
t/regression/table06.t
t/regression/table07.t
t/regression/table08.t
t/regression/table09.t
t/regression/table10.t
t/regression/table11.t
t/regression/table12.t
t/regression/table13.t
t/regression/table14.t
t/regression/table15.t
t/regression/table16.t
t/regression/taint01.t
t/regression/taint02.t
t/regression/tutorial01.t
t/regression/tutorial02.t
t/regression/tutorial03.t
t/regression/utf8_01.t
t/regression/utf8_02.t
t/regression/utf8_03.t
t/regression/utf8_04.t
t/regression/utf8_05.t
t/regression/utf8_06.t
t/regression/utf8_07.t
t/regression/utf8_08.t
t/regression/utf8_09.t
t/regression/utf8_10.t
t/regression/vml01.t
t/regression/vml02.t
t/regression/vml03.t
t/regression/vml04.t
t/regression/xlsx_files/array_formula01.xlsx
t/regression/xlsx_files/array_formula02.xlsx
t/regression/xlsx_files/autofilter00.xlsx
t/regression/xlsx_files/autofilter01.xlsx
t/regression/xlsx_files/autofilter02.xlsx
t/regression/xlsx_files/autofilter03.xlsx
t/regression/xlsx_files/autofilter04.xlsx
t/regression/xlsx_files/autofilter05.xlsx
t/regression/xlsx_files/autofilter06.xlsx
t/regression/xlsx_files/autofilter07.xlsx
t/regression/xlsx_files/button01.xlsx
t/regression/xlsx_files/button02.xlsx
t/regression/xlsx_files/button03.xlsx
t/regression/xlsx_files/button04.xlsx
t/regression/xlsx_files/button05.xlsx
t/regression/xlsx_files/button07.xlsm
t/regression/xlsx_files/button08.xlsx
t/regression/xlsx_files/button09.xlsx
t/regression/xlsx_files/button10.xlsx
t/regression/xlsx_files/button11.xlsx
t/regression/xlsx_files/button12.xlsx
t/regression/xlsx_files/chart_area01.xlsx
t/regression/xlsx_files/chart_area02.xlsx
t/regression/xlsx_files/chart_area03.xlsx
t/regression/xlsx_files/chart_area04.xlsx
t/regression/xlsx_files/chart_axis01.xlsx
t/regression/xlsx_files/chart_axis02.xlsx
t/regression/xlsx_files/chart_axis03.xlsx
t/regression/xlsx_files/chart_axis04.xlsx
t/regression/xlsx_files/chart_axis05.xlsx
t/regression/xlsx_files/chart_axis06.xlsx
t/regression/xlsx_files/chart_axis07.xlsx
t/regression/xlsx_files/chart_axis08.xlsx
t/regression/xlsx_files/chart_axis09.xlsx
t/regression/xlsx_files/chart_axis10.xlsx
t/regression/xlsx_files/chart_axis11.xlsx
t/regression/xlsx_files/chart_axis12.xlsx
t/regression/xlsx_files/chart_axis13.xlsx
t/regression/xlsx_files/chart_axis14.xlsx
t/regression/xlsx_files/chart_axis15.xlsx
t/regression/xlsx_files/chart_axis16.xlsx
t/regression/xlsx_files/chart_axis17.xlsx
t/regression/xlsx_files/chart_axis18.xlsx
t/regression/xlsx_files/chart_axis19.xlsx
t/regression/xlsx_files/chart_axis20.xlsx
t/regression/xlsx_files/chart_axis21.xlsx
t/regression/xlsx_files/chart_axis22.xlsx
t/regression/xlsx_files/chart_axis23.xlsx
t/regression/xlsx_files/chart_axis24.xlsx
t/regression/xlsx_files/chart_axis25.xlsx
t/regression/xlsx_files/chart_axis26.xlsx
t/regression/xlsx_files/chart_axis27.xlsx
t/regression/xlsx_files/chart_axis28.xlsx
t/regression/xlsx_files/chart_axis29.xlsx
t/regression/xlsx_files/chart_axis30.xlsx
t/regression/xlsx_files/chart_axis31.xlsx
t/regression/xlsx_files/chart_axis32.xlsx
t/regression/xlsx_files/chart_axis33.xlsx
t/regression/xlsx_files/chart_axis34.xlsx
t/regression/xlsx_files/chart_bar01.xlsx
t/regression/xlsx_files/chart_bar02.xlsx
t/regression/xlsx_files/chart_bar03.xlsx
t/regression/xlsx_files/chart_bar04.xlsx
t/regression/xlsx_files/chart_bar05.xlsx
t/regression/xlsx_files/chart_bar06.xlsx
t/regression/xlsx_files/chart_bar07.xlsx
t/regression/xlsx_files/chart_bar08.xlsx
t/regression/xlsx_files/chart_bar09.xlsx
t/regression/xlsx_files/chart_bar10.xlsx
t/regression/xlsx_files/chart_bar11.xlsx
t/regression/xlsx_files/chart_bar12.xlsx
t/regression/xlsx_files/chart_bar13.xlsx
t/regression/xlsx_files/chart_bar14.xlsx
t/regression/xlsx_files/chart_bar15.xlsx
t/regression/xlsx_files/chart_bar16.xlsx
t/regression/xlsx_files/chart_bar17.xlsx
t/regression/xlsx_files/chart_bar18.xlsx
t/regression/xlsx_files/chart_bar19.xlsx
t/regression/xlsx_files/chart_bar20.xlsx
t/regression/xlsx_files/chart_bar21.xlsx
t/regression/xlsx_files/chart_bar22.xlsx
t/regression/xlsx_files/chart_bar23.xlsx
t/regression/xlsx_files/chart_bar24.xlsx
t/regression/xlsx_files/chart_blank01.xlsx
t/regression/xlsx_files/chart_blank02.xlsx
t/regression/xlsx_files/chart_blank03.xlsx
t/regression/xlsx_files/chart_blank04.xlsx
t/regression/xlsx_files/chart_blank05.xlsx
t/regression/xlsx_files/chart_blank06.xlsx
t/regression/xlsx_files/chart_chartarea01.xlsx
t/regression/xlsx_files/chart_chartarea03.xlsx
t/regression/xlsx_files/chart_chartarea04.xlsx
t/regression/xlsx_files/chart_chartarea05.xlsx
t/regression/xlsx_files/chart_column01.xlsx
t/regression/xlsx_files/chart_column02.xlsx
t/regression/xlsx_files/chart_column03.xlsx
t/regression/xlsx_files/chart_column04.xlsx
t/regression/xlsx_files/chart_column05.xlsx
t/regression/xlsx_files/chart_column06.xlsx
t/regression/xlsx_files/chart_column07.xlsx
t/regression/xlsx_files/chart_column08.xlsx
t/regression/xlsx_files/chart_crossing01.xlsx
t/regression/xlsx_files/chart_crossing02.xlsx
t/regression/xlsx_files/chart_crossing03.xlsx
t/regression/xlsx_files/chart_crossing04.xlsx
t/regression/xlsx_files/chart_date01.xlsx
t/regression/xlsx_files/chart_date02.xlsx
t/regression/xlsx_files/chart_date03.xlsx
t/regression/xlsx_files/chart_date04.xlsx
t/regression/xlsx_files/chart_drop_lines01.xlsx
t/regression/xlsx_files/chart_drop_lines02.xlsx
t/regression/xlsx_files/chart_drop_lines03.xlsx
t/regression/xlsx_files/chart_drop_lines04.xlsx
t/regression/xlsx_files/chart_errorbars01.xlsx
t/regression/xlsx_files/chart_errorbars02.xlsx
t/regression/xlsx_files/chart_errorbars03.xlsx
t/regression/xlsx_files/chart_errorbars04.xlsx
t/regression/xlsx_files/chart_errorbars05.xlsx
t/regression/xlsx_files/chart_errorbars06.xlsx
t/regression/xlsx_files/chart_errorbars07.xlsx
t/regression/xlsx_files/chart_errorbars08.xlsx
t/regression/xlsx_files/chart_errorbars09.xlsx
t/regression/xlsx_files/chart_errorbars10.xlsx
t/regression/xlsx_files/chart_font01.xlsx
t/regression/xlsx_files/chart_font02.xlsx
t/regression/xlsx_files/chart_font03.xlsx
t/regression/xlsx_files/chart_font04.xlsx
t/regression/xlsx_files/chart_font05.xlsx
t/regression/xlsx_files/chart_font06.xlsx
t/regression/xlsx_files/chart_font07.xlsx
t/regression/xlsx_files/chart_font08.xlsx
t/regression/xlsx_files/chart_font09.xlsx
t/regression/xlsx_files/chart_format01.xlsx
t/regression/xlsx_files/chart_format02.xlsx
t/regression/xlsx_files/chart_format03.xlsx
t/regression/xlsx_files/chart_format04.xlsx
t/regression/xlsx_files/chart_format05.xlsx
t/regression/xlsx_files/chart_format06.xlsx
t/regression/xlsx_files/chart_format07.xlsx
t/regression/xlsx_files/chart_format08.xlsx
t/regression/xlsx_files/chart_format09.xlsx
t/regression/xlsx_files/chart_format10.xlsx
t/regression/xlsx_files/chart_format11.xlsx
t/regression/xlsx_files/chart_format12.xlsx
t/regression/xlsx_files/chart_format13.xlsx
t/regression/xlsx_files/chart_format14.xlsx
t/regression/xlsx_files/chart_format15.xlsx
t/regression/xlsx_files/chart_format16.xlsx
t/regression/xlsx_files/chart_format17.xlsx
t/regression/xlsx_files/chart_format18.xlsx
t/regression/xlsx_files/chart_gap01.xlsx
t/regression/xlsx_files/chart_gap02.xlsx
t/regression/xlsx_files/chart_gap03.xlsx
t/regression/xlsx_files/chart_gridlines01.xlsx
t/regression/xlsx_files/chart_gridlines02.xlsx
t/regression/xlsx_files/chart_gridlines03.xlsx
t/regression/xlsx_files/chart_gridlines04.xlsx
t/regression/xlsx_files/chart_gridlines05.xlsx
t/regression/xlsx_files/chart_gridlines06.xlsx
t/regression/xlsx_files/chart_gridlines07.xlsx
t/regression/xlsx_files/chart_gridlines08.xlsx
t/regression/xlsx_files/chart_gridlines09.xlsx
t/regression/xlsx_files/chart_high_low_lines01.xlsx
t/regression/xlsx_files/chart_high_low_lines02.xlsx
t/regression/xlsx_files/chart_layout01.xlsx
t/regression/xlsx_files/chart_layout02.xlsx
t/regression/xlsx_files/chart_layout03.xlsx
t/regression/xlsx_files/chart_layout04.xlsx
t/regression/xlsx_files/chart_layout05.xlsx
t/regression/xlsx_files/chart_layout06.xlsx
t/regression/xlsx_files/chart_layout07.xlsx
t/regression/xlsx_files/chart_layout08.xlsx
t/regression/xlsx_files/chart_legend01.xlsx
t/regression/xlsx_files/chart_line01.xlsx
t/regression/xlsx_files/chart_line02.xlsx
t/regression/xlsx_files/chart_line03.xlsx
t/regression/xlsx_files/chart_line04.xlsx
t/regression/xlsx_files/chart_name01.xlsx
t/regression/xlsx_files/chart_name02.xlsx
t/regression/xlsx_files/chart_name03.xlsx
t/regression/xlsx_files/chart_order01.xlsx
t/regression/xlsx_files/chart_order03.xlsx
t/regression/xlsx_files/chart_pie01.xlsx
t/regression/xlsx_files/chart_pie02.xlsx
t/regression/xlsx_files/chart_pie03.xlsx
t/regression/xlsx_files/chart_pie04.xlsx
t/regression/xlsx_files/chart_points01.xlsx
t/regression/xlsx_files/chart_points02.xlsx
t/regression/xlsx_files/chart_points03.xlsx
t/regression/xlsx_files/chart_points04.xlsx
t/regression/xlsx_files/chart_points05.xlsx
t/regression/xlsx_files/chart_points06.xlsx
t/regression/xlsx_files/chart_radar01.xlsx
t/regression/xlsx_files/chart_radar02.xlsx
t/regression/xlsx_files/chart_radar03.xlsx
t/regression/xlsx_files/chart_scatter01.xlsx
t/regression/xlsx_files/chart_scatter02.xlsx
t/regression/xlsx_files/chart_scatter03.xlsx
t/regression/xlsx_files/chart_scatter04.xlsx
t/regression/xlsx_files/chart_scatter05.xlsx
t/regression/xlsx_files/chart_scatter06.xlsx
t/regression/xlsx_files/chart_scatter07.xlsx
t/regression/xlsx_files/chart_scatter08.xlsx
t/regression/xlsx_files/chart_scatter09.xlsx
t/regression/xlsx_files/chart_scatter10.xlsx
t/regression/xlsx_files/chart_scatter11.xlsx
t/regression/xlsx_files/chart_scatter12.xlsx
t/regression/xlsx_files/chart_scatter14.xlsx
t/regression/xlsx_files/chart_size01.xlsx
t/regression/xlsx_files/chart_sparse01.xlsx
t/regression/xlsx_files/chart_stock01.xlsx
t/regression/xlsx_files/chart_stock02.xlsx
t/regression/xlsx_files/chart_str01.xlsx
t/regression/xlsx_files/chart_str02.xlsx
t/regression/xlsx_files/chart_table01.xlsx
t/regression/xlsx_files/chart_table02.xlsx
t/regression/xlsx_files/chart_title01.xlsx
t/regression/xlsx_files/chart_title02.xlsx
t/regression/xlsx_files/chart_up_down_bars01.xlsx
t/regression/xlsx_files/chart_up_down_bars02.xlsx
t/regression/xlsx_files/chart_up_down_bars03.xlsx
t/regression/xlsx_files/chartsheet01.xlsx
t/regression/xlsx_files/chartsheet02.xlsx
t/regression/xlsx_files/chartsheet03.xlsx
t/regression/xlsx_files/chartsheet04.xlsx
t/regression/xlsx_files/chartsheet05.xlsx
t/regression/xlsx_files/chartsheet06.xlsx
t/regression/xlsx_files/chartsheet07.xlsx
t/regression/xlsx_files/chartsheet08.xlsx
t/regression/xlsx_files/chartsheet09.xlsx
t/regression/xlsx_files/comment01.xlsx
t/regression/xlsx_files/comment02.xlsx
t/regression/xlsx_files/comment03.xlsx
t/regression/xlsx_files/comment04.xlsx
t/regression/xlsx_files/comment05.xlsx
t/regression/xlsx_files/comment06.xlsx
t/regression/xlsx_files/comment07.xlsx
t/regression/xlsx_files/comment08.xlsx
t/regression/xlsx_files/comment09.xlsx
t/regression/xlsx_files/comment10.xlsx
t/regression/xlsx_files/comment11.xlsx
t/regression/xlsx_files/comment12.xlsx
t/regression/xlsx_files/cond_format01.xlsx
t/regression/xlsx_files/cond_format02.xlsx
t/regression/xlsx_files/cond_format03.xlsx
t/regression/xlsx_files/cond_format04.xlsx
t/regression/xlsx_files/cond_format05.xlsx
t/regression/xlsx_files/cond_format06.xlsx
t/regression/xlsx_files/cond_format07.xlsx
t/regression/xlsx_files/cond_format08.xlsx
t/regression/xlsx_files/cond_format10.xlsx
t/regression/xlsx_files/cond_format11.xlsx
t/regression/xlsx_files/cond_format12.xlsx
t/regression/xlsx_files/cond_format13.xlsx
t/regression/xlsx_files/custom_colors01.xlsx
t/regression/xlsx_files/date_1904_01.xlsx
t/regression/xlsx_files/date_1904_02.xlsx
t/regression/xlsx_files/date_examples01.xlsx
t/regression/xlsx_files/default_row01.xlsx
t/regression/xlsx_files/default_row02.xlsx
t/regression/xlsx_files/default_row03.xlsx
t/regression/xlsx_files/default_row04.xlsx
t/regression/xlsx_files/defined_name01.xlsx
t/regression/xlsx_files/defined_name02.xlsx
t/regression/xlsx_files/defined_name03.xlsx
t/regression/xlsx_files/defined_name04.xlsx
t/regression/xlsx_files/escapes01.xlsx
t/regression/xlsx_files/escapes02.xlsx
t/regression/xlsx_files/escapes03.xlsx
t/regression/xlsx_files/escapes04.xlsx
t/regression/xlsx_files/escapes05.xlsx
t/regression/xlsx_files/escapes06.xlsx
t/regression/xlsx_files/escapes07.xlsx
t/regression/xlsx_files/escapes08.xlsx
t/regression/xlsx_files/filehandle01.xlsx
t/regression/xlsx_files/firstsheet01.xlsx
t/regression/xlsx_files/fit_to_pages01.xlsx
t/regression/xlsx_files/fit_to_pages02.xlsx
t/regression/xlsx_files/fit_to_pages03.xlsx
t/regression/xlsx_files/fit_to_pages04.xlsx
t/regression/xlsx_files/fit_to_pages05.xlsx
t/regression/xlsx_files/format01.xlsx
t/regression/xlsx_files/format02.xlsx
t/regression/xlsx_files/format03.xlsx
t/regression/xlsx_files/format04.xlsx
t/regression/xlsx_files/format05.xlsx
t/regression/xlsx_files/gridlines01.xlsx
t/regression/xlsx_files/hide01.xlsx
t/regression/xlsx_files/hyperlink01.xlsx
t/regression/xlsx_files/hyperlink02.xlsx
t/regression/xlsx_files/hyperlink03.xlsx
t/regression/xlsx_files/hyperlink04.xlsx
t/regression/xlsx_files/hyperlink05.xlsx
t/regression/xlsx_files/hyperlink06.xlsx
t/regression/xlsx_files/hyperlink07.xlsx
t/regression/xlsx_files/hyperlink08.xlsx
t/regression/xlsx_files/hyperlink09.xlsx
t/regression/xlsx_files/hyperlink10.xlsx
t/regression/xlsx_files/hyperlink11.xlsx
t/regression/xlsx_files/hyperlink12.xlsx
t/regression/xlsx_files/hyperlink13.xlsx
t/regression/xlsx_files/hyperlink14.xlsx
t/regression/xlsx_files/hyperlink15.xlsx
t/regression/xlsx_files/hyperlink16.xlsx
t/regression/xlsx_files/hyperlink17.xlsx
t/regression/xlsx_files/hyperlink18.xlsx
t/regression/xlsx_files/hyperlink19.xlsx
t/regression/xlsx_files/hyperlink20.xlsx
t/regression/xlsx_files/image01.xlsx
t/regression/xlsx_files/image02.xlsx
t/regression/xlsx_files/image03.xlsx
t/regression/xlsx_files/image04.xlsx
t/regression/xlsx_files/image05.xlsx
t/regression/xlsx_files/image06.xlsx
t/regression/xlsx_files/image07.xlsx
t/regression/xlsx_files/image08.xlsx
t/regression/xlsx_files/image09.xlsx
t/regression/xlsx_files/image10.xlsx
t/regression/xlsx_files/image11.xlsx
t/regression/xlsx_files/image12.xlsx
t/regression/xlsx_files/image13.xlsx
t/regression/xlsx_files/image14.xlsx
t/regression/xlsx_files/image15.xlsx
t/regression/xlsx_files/image16.xlsx
t/regression/xlsx_files/image17.xlsx
t/regression/xlsx_files/image18.xlsx
t/regression/xlsx_files/image19.xlsx
t/regression/xlsx_files/macro01.xlsm
t/regression/xlsx_files/optimize01.xlsx
t/regression/xlsx_files/optimize02.xlsx
t/regression/xlsx_files/optimize03.xlsx
t/regression/xlsx_files/optimize04.xlsx
t/regression/xlsx_files/optimize05.xlsx
t/regression/xlsx_files/optimize06.xlsx
t/regression/xlsx_files/optimize07.xlsx
t/regression/xlsx_files/optimize08.xlsx
t/regression/xlsx_files/outline01.xlsx
t/regression/xlsx_files/outline02.xlsx
t/regression/xlsx_files/outline03.xlsx
t/regression/xlsx_files/outline04.xlsx
t/regression/xlsx_files/outline05.xlsx
t/regression/xlsx_files/outline06.xlsx
t/regression/xlsx_files/page_breaks01.xlsx
t/regression/xlsx_files/page_breaks02.xlsx
t/regression/xlsx_files/page_breaks03.xlsx
t/regression/xlsx_files/page_breaks04.xlsx
t/regression/xlsx_files/page_breaks05.xlsx
t/regression/xlsx_files/page_breaks06.xlsx
t/regression/xlsx_files/page_view01.xlsx
t/regression/xlsx_files/panes01.xlsx
t/regression/xlsx_files/print_across01.xlsx
t/regression/xlsx_files/print_area01.xlsx
t/regression/xlsx_files/print_area02.xlsx
t/regression/xlsx_files/print_area03.xlsx
t/regression/xlsx_files/print_area04.xlsx
t/regression/xlsx_files/print_area05.xlsx
t/regression/xlsx_files/print_area06.xlsx
t/regression/xlsx_files/print_area07.xlsx
t/regression/xlsx_files/print_options01.xlsx
t/regression/xlsx_files/print_options02.xlsx
t/regression/xlsx_files/print_options03.xlsx
t/regression/xlsx_files/print_options04.xlsx
t/regression/xlsx_files/print_options05.xlsx
t/regression/xlsx_files/print_options06.xlsx
t/regression/xlsx_files/print_scale01.xlsx
t/regression/xlsx_files/print_scale02.xlsx
t/regression/xlsx_files/properties01.xlsx
t/regression/xlsx_files/protect01.xlsx
t/regression/xlsx_files/protect02.xlsx
t/regression/xlsx_files/protect03.xlsx
t/regression/xlsx_files/repeat01.xlsx
t/regression/xlsx_files/repeat02.xlsx
t/regression/xlsx_files/repeat03.xlsx
t/regression/xlsx_files/repeat04.xlsx
t/regression/xlsx_files/repeat05.xlsx
t/regression/xlsx_files/rich_string01.xlsx
t/regression/xlsx_files/rich_string02.xlsx
t/regression/xlsx_files/rich_string03.xlsx
t/regression/xlsx_files/rich_string04.xlsx
t/regression/xlsx_files/rich_string05.xlsx
t/regression/xlsx_files/rich_string06.xlsx
t/regression/xlsx_files/rich_string07.xlsx
t/regression/xlsx_files/rich_string08.xlsx
t/regression/xlsx_files/rich_string09.xlsx
t/regression/xlsx_files/rich_string10.xlsx
t/regression/xlsx_files/rich_string11.xlsx
t/regression/xlsx_files/rich_string12.xlsx
t/regression/xlsx_files/row_col_format01.xlsx
t/regression/xlsx_files/row_col_format02.xlsx
t/regression/xlsx_files/row_col_format03.xlsx
t/regression/xlsx_files/row_col_format04.xlsx
t/regression/xlsx_files/row_col_format05.xlsx
t/regression/xlsx_files/row_col_format06.xlsx
t/regression/xlsx_files/row_col_format07.xlsx
t/regression/xlsx_files/row_col_format08.xlsx
t/regression/xlsx_files/row_col_format09.xlsx
t/regression/xlsx_files/row_col_format10.xlsx
t/regression/xlsx_files/row_col_format11.xlsx
t/regression/xlsx_files/row_col_format12.xlsx
t/regression/xlsx_files/row_col_format13.xlsx
t/regression/xlsx_files/row_col_format14.xlsx
t/regression/xlsx_files/selection01.xlsx
t/regression/xlsx_files/selection02.xlsx
t/regression/xlsx_files/set_column01.xlsx
t/regression/xlsx_files/set_column03.xlsx
t/regression/xlsx_files/set_column04.xlsx
t/regression/xlsx_files/set_column05.xlsx
t/regression/xlsx_files/set_column06.xlsx
t/regression/xlsx_files/set_column07.xlsx
t/regression/xlsx_files/set_column08.xlsx
t/regression/xlsx_files/set_column09.xlsx
t/regression/xlsx_files/set_print_scale01.xlsx
t/regression/xlsx_files/set_start_page01.xlsx
t/regression/xlsx_files/shape01.xlsx
t/regression/xlsx_files/shape02.xlsx
t/regression/xlsx_files/shape03.xlsx
t/regression/xlsx_files/shape04.xlsx
t/regression/xlsx_files/shape_connect01.xlsx
t/regression/xlsx_files/shape_connect02.xlsx
t/regression/xlsx_files/shape_connect03.xlsx
t/regression/xlsx_files/shape_connect04.xlsx
t/regression/xlsx_files/shape_scale01.xlsx
t/regression/xlsx_files/shape_stencil01.xlsx
t/regression/xlsx_files/shared_strings01.xlsx
t/regression/xlsx_files/shared_strings02.xlsx
t/regression/xlsx_files/simple01.xlsx
t/regression/xlsx_files/simple02.xlsx
t/regression/xlsx_files/simple03.xlsx
t/regression/xlsx_files/simple04.xlsx
t/regression/xlsx_files/simple05.xlsx
t/regression/xlsx_files/tab_color01.xlsx
t/regression/xlsx_files/table01.xlsx
t/regression/xlsx_files/table02.xlsx
t/regression/xlsx_files/table03.xlsx
t/regression/xlsx_files/table04.xlsx
t/regression/xlsx_files/table05.xlsx
t/regression/xlsx_files/table06.xlsx
t/regression/xlsx_files/table07.xlsx
t/regression/xlsx_files/table08.xlsx
t/regression/xlsx_files/table09.xlsx
t/regression/xlsx_files/table10.xlsx
t/regression/xlsx_files/table11.xlsx
t/regression/xlsx_files/table12.xlsx
t/regression/xlsx_files/table13.xlsx
t/regression/xlsx_files/table14.xlsx
t/regression/xlsx_files/table15.xlsx
t/regression/xlsx_files/taint01.xlsx
t/regression/xlsx_files/taint02.xlsx
t/regression/xlsx_files/tutorial01.xlsx
t/regression/xlsx_files/tutorial02.xlsx
t/regression/xlsx_files/tutorial03.xlsx
t/regression/xlsx_files/utf8_01.xlsx
t/regression/xlsx_files/utf8_02.xlsx
t/regression/xlsx_files/utf8_03.xlsx
t/regression/xlsx_files/utf8_04.xlsx
t/regression/xlsx_files/utf8_05.xlsx
t/regression/xlsx_files/utf8_06.xlsx
t/regression/xlsx_files/utf8_07.xlsx
t/regression/xlsx_files/utf8_08.xlsx
t/regression/xlsx_files/utf8_09.xlsx
t/regression/xlsx_files/utf8_10.xlsx
t/regression/xlsx_files/vbaProject01.bin
t/regression/xlsx_files/vbaProject02.bin
t/regression/xlsx_files/vml01.xlsx
t/regression/xlsx_files/vml02.xlsx
t/regression/xlsx_files/vml03.xlsx
t/regression/xlsx_files/vml04.xlsx
t/utility/xl_cell_to_rowcol.t
t/utility/xl_col_to_name.t
t/utility/xl_date_1904.t
t/utility/xl_date_list.t
t/utility/xl_dec_col.t
t/utility/xl_dec_row.t
t/utility/xl_decode_date_EU.t
t/utility/xl_decode_date_US.t
t/utility/xl_inc_col.t
t/utility/xl_inc_row.t
t/utility/xl_parse_date.t
t/utility/xl_parse_time.t
t/utility/xl_range.t
t/utility/xl_range_formula.t
t/utility/xl_rowcol_to_cell.t
t/workbook/sub_close.t
t/workbook/sub_get_chart_range.t
t/workbook/sub_sort_defined_names.t
t/workbook/sub_write_book_views.t
t/workbook/sub_write_calc_pr.t
t/workbook/sub_write_defined_name.t
t/workbook/sub_write_defined_names.t
t/workbook/sub_write_ext.t
t/workbook/sub_write_ext_lst.t
t/workbook/sub_write_file_version.t
t/workbook/sub_write_mx_arch_id.t
t/workbook/sub_write_sheet.t
t/workbook/sub_write_sheets.t
t/workbook/sub_write_workbook.t
t/workbook/sub_write_workbook_pr.t
t/workbook/sub_write_workbook_view.t
t/workbook/sub_write_xml_declaration.t
t/workbook/workbook_01.t
t/workbook/workbook_02.t
t/workbook/workbook_03.t
t/worksheet/sparkline_01.t
t/worksheet/sparkline_02.t
t/worksheet/sparkline_03.t
t/worksheet/sparkline_04.t
t/worksheet/sparkline_05.t
t/worksheet/sparkline_06.t
t/worksheet/sparkline_07.t
t/worksheet/sparkline_08.t
t/worksheet/sparkline_09.t
t/worksheet/sparkline_10.t
t/worksheet/sparkline_11.t
t/worksheet/sub_calculate_spans.t
t/worksheet/sub_convert_date_time_01.t
t/worksheet/sub_convert_date_time_02.t
t/worksheet/sub_convert_date_time_03.t
t/worksheet/sub_extract_filter_tokens.t
t/worksheet/sub_parse_filter_expression.t
t/worksheet/sub_position_object.t
t/worksheet/sub_repeat_formula.t
t/worksheet/sub_write_auto_filter.t
t/worksheet/sub_write_brk.t
t/worksheet/sub_write_cell.t
t/worksheet/sub_write_cell_value.t
t/worksheet/sub_write_col_breaks.t
t/worksheet/sub_write_col_info.t
t/worksheet/sub_write_conditional_formatting.t
t/worksheet/sub_write_custom_filter.t
t/worksheet/sub_write_custom_filters.t
t/worksheet/sub_write_data_validations_01.t
t/worksheet/sub_write_data_validations_02.t
t/worksheet/sub_write_dimension.t
t/worksheet/sub_write_filter.t
t/worksheet/sub_write_filter_column.t
t/worksheet/sub_write_filters.t
t/worksheet/sub_write_header_footer.t
t/worksheet/sub_write_hyperlink.t
t/worksheet/sub_write_legacy_drawing.t
t/worksheet/sub_write_merge_cell.t
t/worksheet/sub_write_merge_cells.t
t/worksheet/sub_write_page_margins.t
t/worksheet/sub_write_page_set_up_pr.t
t/worksheet/sub_write_page_setup.t
t/worksheet/sub_write_pane.t
t/worksheet/sub_write_phonetic_pr.t
t/worksheet/sub_write_print_options.t
t/worksheet/sub_write_row.t
t/worksheet/sub_write_row_breaks.t
t/worksheet/sub_write_selection.t
t/worksheet/sub_write_sheet_calc_pr.t
t/worksheet/sub_write_sheet_data.t
t/worksheet/sub_write_sheet_format_pr.t
t/worksheet/sub_write_sheet_pr.t
t/worksheet/sub_write_sheet_protection.t
t/worksheet/sub_write_sheet_view.t
t/worksheet/sub_write_sheet_views1.t
t/worksheet/sub_write_sheet_views2.t
t/worksheet/sub_write_sheet_views3.t
t/worksheet/sub_write_sheet_views4.t
t/worksheet/sub_write_sheet_views5.t
t/worksheet/sub_write_sheet_views6.t
t/worksheet/sub_write_sheet_views7.t
t/worksheet/sub_write_sheet_views8.t
t/worksheet/sub_write_sheet_views9.t
t/worksheet/sub_write_tab_color.t
t/worksheet/sub_write_worksheet.t
t/worksheet/sub_write_xml_declaration.t
t/worksheet/worksheet_01.t
t/worksheet/worksheet_02.t
t/worksheet/worksheet_03.t
t/worksheet/worksheet_04.t
t/worksheet/worksheet_array_formula_01.t
t/worksheet/worksheet_cond_format_01.t
t/worksheet/worksheet_cond_format_02.t
t/worksheet/worksheet_cond_format_03.t
t/worksheet/worksheet_cond_format_04.t
t/worksheet/worksheet_cond_format_05.t
t/worksheet/worksheet_cond_format_06.t
t/worksheet/worksheet_cond_format_07.t
t/worksheet/worksheet_cond_format_08.t
t/worksheet/worksheet_cond_format_09.t
t/worksheet/worksheet_cond_format_10.t
t/worksheet/worksheet_cond_format_11.t
t/worksheet/worksheet_cond_format_12.t
t/worksheet/worksheet_cond_format_13.t
t/worksheet/worksheet_cond_format_14.t
t/worksheet/worksheet_cond_format_15.t
t/worksheet/worksheet_cond_format_16.t
t/worksheet/worksheet_cond_format_17.t
t/worksheet/worksheet_cond_format_18.t
t/worksheet/worksheet_cond_format_19.t
t/worksheet/worksheet_cond_format_20.t
t/worksheet/worksheet_merge_cells_01.t
t/worksheet/worksheet_merge_cells_02.t
t/worksheet/worksheet_merge_cells_03.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
Excel-Writer-XLSX-0.76/META.json 000644 000765 000024 00000002503 12260573500 016236 0 ustar 00John staff 000000 000000 {
"abstract" : "Create a new file in the Excel 2007+ XLSX format.",
"author" : [
"John McNamara (jmcnamara@cpan.org)"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Excel-Writer-XLSX",
"no_index" : {
"directory" : [
"t",
"inc"
]
},
"prereqs" : {
"build" : {
"requires" : {
"ExtUtils::MakeMaker" : 0
}
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : 0
}
},
"runtime" : {
"requires" : {
"Archive::Zip" : "1.3",
"File::Temp" : "0.19",
"IO::File" : "1.14"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "http://github.com/jmcnamara/excel-writer-xlsx/issues"
},
"homepage" : "http://jmcnamara.github.com/excel-writer-xlsx/",
"repository" : {
"url" : "http://github.com/jmcnamara/excel-writer-xlsx"
},
"x_MailingList" : "http://groups.google.com/group/spreadsheet-writeexcel"
},
"version" : "0.76"
}
Excel-Writer-XLSX-0.76/META.yml 000644 000765 000024 00000001470 12260573500 016070 0 ustar 00John staff 000000 000000 ---
abstract: 'Create a new file in the Excel 2007+ XLSX format.'
author:
- 'John McNamara (jmcnamara@cpan.org)'
build_requires:
ExtUtils::MakeMaker: 0
configure_requires:
ExtUtils::MakeMaker: 0
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112150'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: Excel-Writer-XLSX
no_index:
directory:
- t
- inc
requires:
Archive::Zip: 1.3
File::Temp: 0.19
IO::File: 1.14
resources:
bugtracker: http://github.com/jmcnamara/excel-writer-xlsx/issues
homepage: http://jmcnamara.github.com/excel-writer-xlsx/
repository: http://github.com/jmcnamara/excel-writer-xlsx
x_MailingList: http://groups.google.com/group/spreadsheet-writeexcel
version: 0.76
Excel-Writer-XLSX-0.76/README 000644 000765 000024 00000004151 12260572702 015501 0 ustar 00John staff 000000 000000 NAME
Excel::Writer::XLSX - Create a new file in the Excel 2007+ XLSX format.
DESCRIPTION
The Excel::Writer::XLSX module can be used to create a new Excel file
in the 2007+ XLSX format.
The module supports the following Excel features:
* Multiple worksheets
* Strings and numbers
* Unicode text
* Cell formatting
* Formulas
* Images
* Charts
* Autofilters
* Data validation
* Conditional formatting
* Macros
* Tables
* Shapes
* Sparklines
* Hyperlinks
* Rich string formats
* Defined names
* Grouping/Outlines
* Cell comments
* Panes
* Page set-up and printing options
Excel::Writer::XLSX uses the same interface as Spreadsheet::WriteExcel.
SYNOPSIS
To write a string, a formatted string, a number and a formula to
the first worksheet in an Excel XML spreadsheet called perl.xls:
use Excel::Writer::XLSX;
# Create a new Excel workbook
my $workbook = Excel::Writer::XLSX->new('perl.xlsx');
# Add a worksheet
$worksheet = $workbook->add_worksheet();
# Add and define a format
$format = $workbook->add_format(); # Add a format
$format->set_bold();
$format->set_color('red');
$format->set_align('center');
# Write a formatted and unformatted string, row and column notation.
$col = $row = 0;
$worksheet->write($row, $col, "Hi Excel!", $format);
$worksheet->write(1, $col, "Hi Excel!");
# Write a number and a formula using A1 notation
$worksheet->write('A3', 1.2345);
$worksheet->write('A4', '=SIN(PI()/4)');
INSTALLATION
Use the standard Unix style installation.
Unzip and untar the module as follows:
tar -zxvf Excel-Writer-XLSX-0.76.tar.gz
The module can be installed using the standard Perl procedure:
perl Makefile.PL
make
make test
make install # As sudo/root
AUTHOR
John McNamara (jmcnamara@cpan.org)
Excel-Writer-XLSX-0.76/t/ 000755 000765 000024 00000000000 12260573477 015075 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/chart/ 000755 000765 000024 00000000000 12260573500 016161 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/chartsheet/ 000755 000765 000024 00000000000 12260573477 017227 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/drawing/ 000755 000765 000024 00000000000 12260573500 016513 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/lib/ 000755 000765 000024 00000000000 12260573477 015643 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/package/ 000755 000765 000024 00000000000 12260573474 016465 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/regression/ 000755 000765 000024 00000000000 12260573500 017240 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/utility/ 000755 000765 000024 00000000000 12260573500 016563 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/workbook/ 000755 000765 000024 00000000000 12260573477 016732 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/worksheet/ 000755 000765 000024 00000000000 12260573500 017073 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/worksheet/sparkline_01.t 000644 000765 000024 00000004063 12241403706 021552 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
# No sparkline in the first testcase.
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_02.t 000644 000765 000024 00000006102 12241403706 021547 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'Sheet1!A1:E1',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_03.t 000644 000765 000024 00000010406 12241403706 021552 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Excel::Writer::XLSX::Utility ':rowcol';
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => xl_rowcol_to_cell( 0, 5 ),
range => xl_range_formula( 'Sheet1', 0, 0, 0, 4 ),
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => xl_range( 1, 1, 0, 4 ),
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_04.t 000644 000765 000024 00000006157 12241403706 021563 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'Sheet1!A1:E1',
type => 'column',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_05.t 000644 000765 000024 00000006165 12241403706 021563 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => ['$F$1'],
range => ['$A$1:$E$1'],
type => 'win_loss',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_06.t 000644 000765 000024 00000007035 12241403706 021561 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => [ 'F1', 'F2' ],
range => [ 'A1:E1', 'A2:E2' ],
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A1:E1
F1
Sheet1!A2:E2
F2
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_07.t 000644 000765 000024 00000024574 12241403706 021571 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
$worksheet->write('A3', $data);
$worksheet->write('A4', $data);
$worksheet->write('A5', $data);
$worksheet->write('A6', $data);
$worksheet->write('A7', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
type => 'column',
high_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
type => 'column',
low_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
type => 'column',
negative_points => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F4',
range => 'A4:E4',
type => 'column',
first_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F5',
range => 'A5:E5',
type => 'column',
last_point => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F6',
range => 'A6:E6',
type => 'column',
markers => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F7',
range => 'A7:E7',
type => 'column',
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A7:E7
F7
Sheet1!A6:E6
F6
Sheet1!A5:E5
F5
Sheet1!A4:E4
F4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_08.t 000644 000765 000024 00000012550 12241403706 021561 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
$worksheet->write('A2', $data);
$worksheet->write('A3', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
style => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
style => 2,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
series_color => '#FF0000',
}
);
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_09.t 000644 000765 000024 00000112304 12241403706 021560 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
# Set up sparklines
# Test all the styles.
for my $i ( 1 .. 36 ) {
$worksheet->write( $i - 1, 0, $data );
$worksheet->add_sparkline(
{
location => 'F' . $i,
range => 'A' . $i . ':E' . $i,
style => $i,
}
);
}
# End sparklines
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
Sheet1!A36:E36
F36
Sheet1!A35:E35
F35
Sheet1!A34:E34
F34
Sheet1!A33:E33
F33
Sheet1!A32:E32
F32
Sheet1!A31:E31
F31
Sheet1!A30:E30
F30
Sheet1!A29:E29
F29
Sheet1!A28:E28
F28
Sheet1!A27:E27
F27
Sheet1!A26:E26
F26
Sheet1!A25:E25
F25
Sheet1!A24:E24
F24
Sheet1!A23:E23
F23
Sheet1!A22:E22
F22
Sheet1!A21:E21
F21
Sheet1!A20:E20
F20
Sheet1!A19:E19
F19
Sheet1!A18:E18
F18
Sheet1!A17:E17
F17
Sheet1!A16:E16
F16
Sheet1!A15:E15
F15
Sheet1!A14:E14
F14
Sheet1!A13:E13
F13
Sheet1!A12:E12
F12
Sheet1!A11:E11
F11
Sheet1!A10:E10
F10
Sheet1!A9:E9
F9
Sheet1!A8:E8
F8
Sheet1!A7:E7
F7
Sheet1!A6:E6
F6
Sheet1!A5:E5
F5
Sheet1!A4:E4
F4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_10.t 000644 000765 000024 00000006766 12241403706 021566 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write('A1', $data);
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
series_color => '#C00000',
negative_color => '#FF0000',
markers_color => '#FFC000',
first_color => '#00B050',
last_color => '#00B0F0',
high_color => '#FFFF00',
low_color => '#92D050',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sparkline_11.t 000644 000765 000024 00000015046 12241403706 021556 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions
qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet( \$got );
$worksheet->{_excel_version} = 2010;
$worksheet->{_name} = 'Sheet1';
$worksheet->select();
my $data = [ -2, 2, 3, -1, 0 ];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A2', $data );
$worksheet->write( 'A3', $data );
$worksheet->write( 'A4', [ 1, 2, 3, 4, 5 ] );
# Set up sparklines
$worksheet->add_sparkline(
{
location => 'F1',
range => 'A1:E1',
max => 0.5,
min => -0.5,
axis => 1,
reverse => 1,
empty_cells => 'zero',
weight => 0.25,
high_point => 1,
low_point => 1,
negative_points => 1,
first_point => 1,
last_point => 1,
markers => 1,
}
);
$worksheet->add_sparkline(
{
location => 'F2',
range => 'A2:E2',
max => 'group',
min => 'group',
empty_cells => 'connect',
weight => 2.25,
}
);
$worksheet->add_sparkline(
{
location => 'F3',
range => 'A3:E3',
max => 'group',
min => '0',
show_hidden => 1,
weight => 6,
date_axis => 'A4:E4',
}
);
# End sparkline
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
-2
2
3
-1
0
-2
2
3
-1
0
-2
2
3
-1
0
1
2
3
4
5
Sheet1!A4:E4
Sheet1!A3:E3
F3
Sheet1!A2:E2
F2
Sheet1!A1:E1
F1
Excel-Writer-XLSX-0.76/t/worksheet/sub_calculate_spans.t 000644 000765 000024 00000022601 12241403706 023272 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Worksheet;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $row;
my $col;
my $worksheet;
###############################################################################
#
# 1. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 0;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:16', '17:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 2. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 1;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:15', '16:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 3. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 2;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:14', '15:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 4. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 3;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:13', '14:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 5. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 4;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:12', '13:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 6. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 5;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:11', '12:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 7. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 6;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:10', '11:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 8. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 7;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:9', '10:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 9. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 8;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:8', '9:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 10. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 9;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:7', '8:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 11. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 10;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:6', '7:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 12. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 11;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:5', '6:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 13. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 12;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:4', '5:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 14. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 13;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:3', '4:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 15. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 14;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:2', '3:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 16. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 15;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ '1:1', '2:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 17. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 16;
$col = 0;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ undef, '1:16', '17:17' ];
is_deeply( $got, $expected, $caption );
###############################################################################
#
# 18. Test _calculate_spans() method for range ($row, $col), ($row+16, $col+16).
#
$row = 16;
$col = 1;
$caption = " \tWorksheet: _calculate_spans()";
$worksheet = new Excel::Writer::XLSX::Worksheet;
for ($row .. $row +16) {
$worksheet->write($row++, $col++, 1);
}
$worksheet->_calculate_spans();
$got = $worksheet->{_row_spans};
$expected = [ undef, '2:17', '18:18' ];
is_deeply( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_convert_date_time_01.t 000644 000765 000024 00000055345 12241403706 024137 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 100;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
$worksheet->{_1904} = 0;
# Set float difference limit to half of an Excel millisecond
my $flt_delta = 0.5 / ( 24 * 60 * 60 * 1000 );
##############################################################################
#
# Float comparison function.
#
sub flt_cmp {
return abs( $_[0] - $_[1] ) < $flt_delta;
}
##############################################################################
#
# Test the flt_cmp() function used in the other tests.
#
$date_time = '1899-12-31T00:00:00.0004';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 1. This should pass. It is less than the float diff limit.
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" );
$date_time = '1899-12-31T00:00:00.0005';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 2. This should fail. It is equal to the float diff limit.
my $diff = !flt_cmp( $number, $result );
ok( $diff, " Testing convert_date_time: $date_time $number" );
##############################################################################
#
# Test the time data generated in Excel.
#
while ( ) {
last if /^# stop/; # For debugging
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
if ( /"DateTime">([^<]+)/ ) {
my $date_time = $1;
my $line = ;
if ( $line =~ /"Number">([^<]+)/ ) {
my $number = 0 + $1;
my $result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" )
or diag( "difference between $number and $result\n" . "= "
. abs( $number - $result ) . "\n"
. "> $flt_delta" );
}
}
}
__DATA__
# Test data taken from Excel in XML format.
1899-12-31T00:00:00.000 |
0 |
1982-08-25T00:15:20.213 |
30188.010650613425 |
2065-04-19T00:16:48.290 |
60376.011670023145 |
2147-12-15T00:55:25.446 |
90565.038488958337 |
2230-08-10T01:02:46.891 |
120753.04359827546 |
2313-04-06T01:04:15.597 |
150942.04462496529 |
2395-11-30T01:09:40.889 |
181130.04838991899 |
2478-07-25T01:11:32.560 |
211318.04968240741 |
2561-03-21T01:30:19.169 |
241507.06272186342 |
2643-11-15T01:48:25.580 |
271695.07529606484 |
2726-07-12T02:03:31.919 |
301884.08578609955 |
2809-03-06T02:11:11.986 |
332072.09111094906 |
2891-10-31T02:24:37.095 |
362261.10042934027 |
2974-06-26T02:35:07.220 |
392449.10772245371 |
3057-02-19T02:45:12.109 |
422637.1147234838 |
3139-10-17T03:06:39.990 |
452826.12962951389 |
3222-06-11T03:08:08.251 |
483014.13065105322 |
3305-02-05T03:19:12.576 |
513203.13834 |
3387-10-01T03:29:42.574 |
543391.14563164348 |
3470-05-27T03:37:30.813 |
573579.15105107636 |
3553-01-21T04:14:38.231 |
603768.17683137732 |
3635-09-16T04:16:28.559 |
633956.17810832174 |
3718-05-13T04:17:58.222 |
664145.17914608796 |
3801-01-06T04:21:41.794 |
694333.18173372687 |
3883-09-02T04:56:35.792 |
724522.20596981479 |
3966-04-28T05:25:14.885 |
754710.2258667245 |
4048-12-21T05:26:05.724 |
784898.22645513888 |
4131-08-18T05:46:44.068 |
815087.24078782403 |
4214-04-13T05:48:01.141 |
845275.24167987274 |
4296-12-07T05:53:52.315 |
875464.24574438657 |
4379-08-03T06:14:48.580 |
905652.26028449077 |
4462-03-28T06:46:15.738 |
935840.28212659725 |
4544-11-22T07:31:20.407 |
966029.31343063654 |
4627-07-19T07:58:33.754 |
996217.33233511576 |
4710-03-15T08:07:43.130 |
1026406.3386936343 |
4792-11-07T08:29:11.091 |
1056594.3536005903 |
4875-07-04T09:08:15.328 |
1086783.3807329629 |
4958-02-27T09:30:41.781 |
1116971.3963169097 |
5040-10-23T09:34:04.462 |
1147159.3986627546 |
5123-06-20T09:37:23.945 |
1177348.4009715857 |
5206-02-12T09:37:56.655 |
1207536.4013501736 |
5288-10-08T09:45:12.230 |
1237725.406391551 |
5371-06-04T09:54:14.782 |
1267913.412671088 |
5454-01-28T09:54:22.108 |
1298101.4127558796 |
5536-09-24T10:01:36.151 |
1328290.4177795255 |
5619-05-20T12:09:48.602 |
1358478.5068125231 |
5702-01-14T12:34:08.549 |
1388667.5237100578 |
5784-09-08T12:56:06.495 |
1418855.5389640625 |
5867-05-06T12:58:58.217 |
1449044.5409515856 |
5949-12-30T12:59:54.263 |
1479232.5416002662 |
6032-08-24T13:34:41.331 |
1509420.5657561459 |
6115-04-21T13:58:28.601 |
1539609.5822754744 |
6197-12-14T14:02:16.899 |
1569797.5849178126 |
6280-08-10T14:36:17.444 |
1599986.6085352316 |
6363-04-06T14:37:57.451 |
1630174.60969272 |
6445-11-30T14:57:42.757 |
1660363.6234115392 |
6528-07-26T15:10:48.307 |
1690551.6325035533 |
6611-03-22T15:14:39.890 |
1720739.635183912 |
6693-11-15T15:19:47.988 |
1750928.6387498612 |
6776-07-11T16:04:24.344 |
1781116.6697262037 |
6859-03-07T16:22:23.952 |
1811305.6822216667 |
6941-10-31T16:29:55.999 |
1841493.6874536921 |
7024-06-26T16:58:20.259 |
1871681.7071789235 |
7107-02-21T17:04:02.415 |
1901870.7111390624 |
7189-10-16T17:18:29.630 |
1932058.7211762732 |
7272-06-11T17:47:21.323 |
1962247.7412190163 |
7355-02-05T17:53:29.866 |
1992435.7454845603 |
7437-10-02T17:53:41.076 |
2022624.7456143056 |
7520-05-28T17:55:06.044 |
2052812.7465977315 |
7603-01-21T18:14:49.151 |
2083000.7602910995 |
7685-09-16T18:17:45.738 |
2113189.7623349307 |
7768-05-12T18:29:59.700 |
2143377.7708298611 |
7851-01-07T18:33:21.233 |
2173566.773162419 |
7933-09-02T19:14:24.673 |
2203754.8016744559 |
8016-04-27T19:17:12.816 |
2233942.8036205554 |
8098-12-22T19:23:36.418 |
2264131.8080603937 |
8181-08-17T19:46:25.908 |
2294319.8239109721 |
8264-04-13T20:07:47.314 |
2324508.8387420601 |
8346-12-08T20:31:37.603 |
2354696.855296331 |
8429-08-03T20:39:57.770 |
2384885.8610853008 |
8512-03-29T20:50:17.067 |
2415073.8682530904 |
8594-11-22T21:02:57.827 |
2445261.8770581828 |
8677-07-19T21:23:05.519 |
2475450.8910360998 |
8760-03-14T21:34:49.572 |
2505638.8991848612 |
8842-11-08T21:39:05.944 |
2535827.9021521294 |
8925-07-04T21:39:18.426 |
2566015.9022965971 |
9008-02-28T21:46:07.769 |
2596203.9070343636 |
9090-10-24T21:57:55.662 |
2626392.9152275696 |
9173-06-19T22:19:11.732 |
2656580.9299968979 |
9256-02-13T22:23:51.376 |
2686769.9332335186 |
9338-10-09T22:27:58.771 |
2716957.9360968866 |
9421-06-05T22:43:30.392 |
2747146.9468795368 |
9504-01-30T22:48:25.834 |
2777334.9502990046 |
9586-09-24T22:53:51.727 |
2807522.9540709145 |
9669-05-20T23:12:56.536 |
2837711.9673210187 |
9752-01-14T23:15:54.109 |
2867899.9693762613 |
9834-09-10T23:17:12.632 |
2898088.9702850925 |
9999-12-31T23:59:59.000 |
2958465.999988426 |
Excel-Writer-XLSX-0.76/t/worksheet/sub_convert_date_time_02.t 000644 000765 000024 00000032240 12241403706 024125 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
# Tests dates in 1900 and 1904 format.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 420;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
##############################################################################
#
# Test the dates generated by Excel.
#
while () {
last if /^# stop/; # For debugging
$worksheet->{_1904} = 0 if /Excel 1900/; # Change date system
$worksheet->{_1904} = 1 if /Excel 1904/; # Change date system
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
my ($count, $date, $result) = split;
my $number = $worksheet->convert_date_time($date);
$number = -1 unless defined $number;
is($number, $result, " Testing convert_date_time: $date $result")
}
__DATA__
#
# The following data was generated by Excel.
#
#
# Excel 1900 date system
#
1 1899-12-31T 0
2 1900-01-00T 0
3 1900-01-01T 1
4 1900-02-27T 58
5 1900-02-28T 59
6 1900-02-29T 60
7 1900-03-01T 61
8 1900-03-02T 62
9 1900-03-11T 71
10 1900-04-08T 99
11 1900-09-12T 256
12 1901-05-03T 489
13 1901-10-13T 652
14 1902-02-15T 777
15 1902-06-06T 888
16 1902-09-25T 999
17 1902-09-27T 1001
18 1903-04-26T 1212
19 1903-08-05T 1313
20 1903-12-31T 1461
21 1904-01-01T 1462
22 1904-02-28T 1520
23 1904-02-29T 1521
24 1904-03-01T 1522
25 1907-02-27T 2615
26 1907-02-28T 2616
27 1907-03-01T 2617
28 1907-03-02T 2618
29 1907-03-03T 2619
30 1907-03-04T 2620
31 1907-03-05T 2621
32 1907-03-06T 2622
33 1999-01-01T 36161
34 1999-01-31T 36191
35 1999-02-01T 36192
36 1999-02-28T 36219
37 1999-03-01T 36220
38 1999-03-31T 36250
39 1999-04-01T 36251
40 1999-04-30T 36280
41 1999-05-01T 36281
42 1999-05-31T 36311
43 1999-06-01T 36312
44 1999-06-30T 36341
45 1999-07-01T 36342
46 1999-07-31T 36372
47 1999-08-01T 36373
48 1999-08-31T 36403
49 1999-09-01T 36404
50 1999-09-30T 36433
51 1999-10-01T 36434
52 1999-10-31T 36464
53 1999-11-01T 36465
54 1999-11-30T 36494
55 1999-12-01T 36495
56 1999-12-31T 36525
57 2000-01-01T 36526
58 2000-01-31T 36556
59 2000-02-01T 36557
60 2000-02-29T 36585
61 2000-03-01T 36586
62 2000-03-31T 36616
63 2000-04-01T 36617
64 2000-04-30T 36646
65 2000-05-01T 36647
66 2000-05-31T 36677
67 2000-06-01T 36678
68 2000-06-30T 36707
69 2000-07-01T 36708
70 2000-07-31T 36738
71 2000-08-01T 36739
72 2000-08-31T 36769
73 2000-09-01T 36770
74 2000-09-30T 36799
75 2000-10-01T 36800
76 2000-10-31T 36830
77 2000-11-01T 36831
78 2000-11-30T 36860
79 2000-12-01T 36861
80 2000-12-31T 36891
81 2001-01-01T 36892
82 2001-01-31T 36922
83 2001-02-01T 36923
84 2001-02-28T 36950
85 2001-03-01T 36951
86 2001-03-31T 36981
87 2001-04-01T 36982
88 2001-04-30T 37011
89 2001-05-01T 37012
90 2001-05-31T 37042
91 2001-06-01T 37043
92 2001-06-30T 37072
93 2001-07-01T 37073
94 2001-07-31T 37103
95 2001-08-01T 37104
96 2001-08-31T 37134
97 2001-09-01T 37135
98 2001-09-30T 37164
99 2001-10-01T 37165
100 2001-10-31T 37195
101 2001-11-01T 37196
102 2001-11-30T 37225
103 2001-12-01T 37226
104 2001-12-31T 37256
105 2400-01-01T 182623
106 2400-01-31T 182653
107 2400-02-01T 182654
108 2400-02-29T 182682
109 2400-03-01T 182683
110 2400-03-31T 182713
111 2400-04-01T 182714
112 2400-04-30T 182743
113 2400-05-01T 182744
114 2400-05-31T 182774
115 2400-06-01T 182775
116 2400-06-30T 182804
117 2400-07-01T 182805
118 2400-07-31T 182835
119 2400-08-01T 182836
120 2400-08-31T 182866
121 2400-09-01T 182867
122 2400-09-30T 182896
123 2400-10-01T 182897
124 2400-10-31T 182927
125 2400-11-01T 182928
126 2400-11-30T 182957
127 2400-12-01T 182958
128 2400-12-31T 182988
129 4000-01-01T 767011
130 4000-01-31T 767041
131 4000-02-01T 767042
132 4000-02-29T 767070
133 4000-03-01T 767071
134 4000-03-31T 767101
135 4000-04-01T 767102
136 4000-04-30T 767131
137 4000-05-01T 767132
138 4000-05-31T 767162
139 4000-06-01T 767163
140 4000-06-30T 767192
141 4000-07-01T 767193
142 4000-07-31T 767223
143 4000-08-01T 767224
144 4000-08-31T 767254
145 4000-09-01T 767255
146 4000-09-30T 767284
147 4000-10-01T 767285
148 4000-10-31T 767315
149 4000-11-01T 767316
150 4000-11-30T 767345
151 4000-12-01T 767346
152 4000-12-31T 767376
153 4321-01-01T 884254
154 4321-01-31T 884284
155 4321-02-01T 884285
156 4321-02-28T 884312
157 4321-03-01T 884313
158 4321-03-31T 884343
159 4321-04-01T 884344
160 4321-04-30T 884373
161 4321-05-01T 884374
162 4321-05-31T 884404
163 4321-06-01T 884405
164 4321-06-30T 884434
165 4321-07-01T 884435
166 4321-07-31T 884465
167 4321-08-01T 884466
168 4321-08-31T 884496
169 4321-09-01T 884497
170 4321-09-30T 884526
171 4321-10-01T 884527
172 4321-10-31T 884557
173 4321-11-01T 884558
174 4321-11-30T 884587
175 4321-12-01T 884588
176 4321-12-31T 884618
177 9999-01-01T 2958101
178 9999-01-31T 2958131
179 9999-02-01T 2958132
180 9999-02-28T 2958159
181 9999-03-01T 2958160
182 9999-03-31T 2958190
183 9999-04-01T 2958191
184 9999-04-30T 2958220
185 9999-05-01T 2958221
186 9999-05-31T 2958251
187 9999-06-01T 2958252
188 9999-06-30T 2958281
189 9999-07-01T 2958282
190 9999-07-31T 2958312
191 9999-08-01T 2958313
192 9999-08-31T 2958343
193 9999-09-01T 2958344
194 9999-09-30T 2958373
195 9999-10-01T 2958374
196 9999-10-31T 2958404
197 9999-11-01T 2958405
198 9999-11-30T 2958434
199 9999-12-01T 2958435
200 9999-12-31T 2958465
#
# Excel 1904 date system
#
201 1904-01-01T 0
202 1904-01-31T 30
203 1904-02-01T 31
204 1904-02-29T 59
205 1904-03-01T 60
206 1904-03-31T 90
207 1904-04-01T 91
208 1904-04-30T 120
209 1904-05-01T 121
210 1904-05-31T 151
211 1904-06-01T 152
212 1904-06-30T 181
213 1904-07-01T 182
214 1904-07-31T 212
215 1904-08-01T 213
216 1904-08-31T 243
217 1904-09-01T 244
218 1904-09-30T 273
219 1904-10-01T 274
220 1904-10-31T 304
221 1904-11-01T 305
222 1904-11-30T 334
223 1904-12-01T 335
224 1904-12-31T 365
225 1907-02-27T 1153
226 1907-02-28T 1154
227 1907-03-01T 1155
228 1907-03-02T 1156
229 1907-03-03T 1157
230 1907-03-04T 1158
231 1907-03-05T 1159
232 1907-03-06T 1160
233 1999-01-01T 34699
234 1999-01-31T 34729
235 1999-02-01T 34730
236 1999-02-28T 34757
237 1999-03-01T 34758
238 1999-03-31T 34788
239 1999-04-01T 34789
240 1999-04-30T 34818
241 1999-05-01T 34819
242 1999-05-31T 34849
243 1999-06-01T 34850
244 1999-06-30T 34879
245 1999-07-01T 34880
246 1999-07-31T 34910
247 1999-08-01T 34911
248 1999-08-31T 34941
249 1999-09-01T 34942
250 1999-09-30T 34971
251 1999-10-01T 34972
252 1999-10-31T 35002
253 1999-11-01T 35003
254 1999-11-30T 35032
255 1999-12-01T 35033
256 1999-12-31T 35063
257 2000-01-01T 35064
258 2000-01-31T 35094
259 2000-02-01T 35095
260 2000-02-29T 35123
261 2000-03-01T 35124
262 2000-03-31T 35154
263 2000-04-01T 35155
264 2000-04-30T 35184
265 2000-05-01T 35185
266 2000-05-31T 35215
267 2000-06-01T 35216
268 2000-06-30T 35245
269 2000-07-01T 35246
270 2000-07-31T 35276
271 2000-08-01T 35277
272 2000-08-31T 35307
273 2000-09-01T 35308
274 2000-09-30T 35337
275 2000-10-01T 35338
276 2000-10-31T 35368
277 2000-11-01T 35369
278 2000-11-30T 35398
279 2000-12-01T 35399
280 2000-12-31T 35429
281 2001-01-01T 35430
282 2001-01-31T 35460
283 2001-02-01T 35461
284 2001-02-28T 35488
285 2001-03-01T 35489
286 2001-03-31T 35519
287 2001-04-01T 35520
288 2001-04-30T 35549
289 2001-05-01T 35550
290 2001-05-31T 35580
291 2001-06-01T 35581
292 2001-06-30T 35610
293 2001-07-01T 35611
294 2001-07-31T 35641
295 2001-08-01T 35642
296 2001-08-31T 35672
297 2001-09-01T 35673
298 2001-09-30T 35702
299 2001-10-01T 35703
300 2001-10-31T 35733
301 2001-11-01T 35734
302 2001-11-30T 35763
303 2001-12-01T 35764
304 2001-12-31T 35794
305 2400-01-01T 181161
306 2400-01-31T 181191
307 2400-02-01T 181192
308 2400-02-29T 181220
309 2400-03-01T 181221
310 2400-03-31T 181251
311 2400-04-01T 181252
312 2400-04-30T 181281
313 2400-05-01T 181282
314 2400-05-31T 181312
315 2400-06-01T 181313
316 2400-06-30T 181342
317 2400-07-01T 181343
318 2400-07-31T 181373
319 2400-08-01T 181374
320 2400-08-31T 181404
321 2400-09-01T 181405
322 2400-09-30T 181434
323 2400-10-01T 181435
324 2400-10-31T 181465
325 2400-11-01T 181466
326 2400-11-30T 181495
327 2400-12-01T 181496
328 2400-12-31T 181526
329 4000-01-01T 765549
330 4000-01-31T 765579
331 4000-02-01T 765580
332 4000-02-29T 765608
333 4000-03-01T 765609
334 4000-03-31T 765639
335 4000-04-01T 765640
336 4000-04-30T 765669
337 4000-05-01T 765670
338 4000-05-31T 765700
339 4000-06-01T 765701
340 4000-06-30T 765730
341 4000-07-01T 765731
342 4000-07-31T 765761
343 4000-08-01T 765762
344 4000-08-31T 765792
345 4000-09-01T 765793
346 4000-09-30T 765822
347 4000-10-01T 765823
348 4000-10-31T 765853
349 4000-11-01T 765854
350 4000-11-30T 765883
351 4000-12-01T 765884
352 4000-12-31T 765914
353 4321-01-01T 882792
354 4321-01-31T 882822
355 4321-02-01T 882823
356 4321-02-28T 882850
357 4321-03-01T 882851
358 4321-03-31T 882881
359 4321-04-01T 882882
360 4321-04-30T 882911
361 4321-05-01T 882912
362 4321-05-31T 882942
363 4321-06-01T 882943
364 4321-06-30T 882972
365 4321-07-01T 882973
366 4321-07-31T 883003
367 4321-08-01T 883004
368 4321-08-31T 883034
369 4321-09-01T 883035
370 4321-09-30T 883064
371 4321-10-01T 883065
372 4321-10-31T 883095
373 4321-11-01T 883096
374 4321-11-30T 883125
375 4321-12-01T 883126
376 4321-12-31T 883156
377 9999-01-01T 2956639
378 9999-01-31T 2956669
379 9999-02-01T 2956670
380 9999-02-28T 2956697
381 9999-03-01T 2956698
382 9999-03-31T 2956728
383 9999-04-01T 2956729
384 9999-04-30T 2956758
385 9999-05-01T 2956759
386 9999-05-31T 2956789
387 9999-06-01T 2956790
388 9999-06-30T 2956819
389 9999-07-01T 2956820
390 9999-07-31T 2956850
391 9999-08-01T 2956851
392 9999-08-31T 2956881
393 9999-09-01T 2956882
394 9999-09-30T 2956911
395 9999-10-01T 2956912
396 9999-10-31T 2956942
397 9999-11-01T 2956943
398 9999-11-30T 2956972
399 9999-12-01T 2956973
400 9999-12-31T 2957003
#
# The following dates are invalid.
#
#
# Excel 1900 date system
#
401 0000-12-30T -1 # Below year range.
402 1000-12-30T -1 # Below year range.
403 1899-12-30T -1 # Below year range.
404 2002-02-29T -1 # False leap-day.
405 2000-00-00T -1 # No month or day.
406 2000-01-00T -1 # No day.
407 2000-00-01T -1 # No month.
408 2000-13-01T -1 # Month out of range.
409 2000-12-32T -1 # Day out of range.
410 10000-01-01T -1 # Year out of range.
#
# Excel 1904 date system
#
411 1899-12-31T -1 # Below year range.
412 1900-01-01T -1 # Below year range.
413 1903-12-31T -1 # Below year range.
414 2001-02-29T -1 # False leap-day.
415 2000-00-00T -1 # No month or day.
416 2000-01-00T -1 # No day.
417 2000-00-01T -1 # No month.
418 2000-13-01T -1 # Month out of range.
419 2000-12-32T -1 # Day out of range.
420 10000-01-01T -1 # Year out of range.
Excel-Writer-XLSX-0.76/t/worksheet/sub_convert_date_time_03.t 000644 000765 000024 00000057516 12241403706 024143 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet date and time handling.
#
# Tests date and time second handling.
#
# reverse ('(c)'), May 2004, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 104;
my $got;
my $date_time;
my $number;
my $result;
my $worksheet = _new_worksheet( \$got );
$worksheet->{_1904} = 0;
# Set float difference limit to half of an Excel millisecond
my $flt_delta = 0.5 / ( 24 * 60 * 60 * 1000 );
##############################################################################
#
# Float comparison function.
#
sub flt_cmp {
return abs( $_[0] - $_[1] ) < $flt_delta;
}
##############################################################################
#
# Test the flt_cmp() function used in the other tests.
#
$date_time = '1899-12-31T00:00:00.0004';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 1. This should pass. It is less than the float diff limit.
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" );
$date_time = '1899-12-31T00:00:00.0005';
$number = 0;
$result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
# Test 2. This should fail. It is equal to the float diff limit.
my $diff = !flt_cmp( $number, $result );
ok( $diff, " Testing convert_date_time: $date_time $number" );
##############################################################################
#
# Test some false times.
#
# These should fail.
my $fail;
$date_time = '1899-12-31T24:00:00.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect hour caught." );
$date_time = '1899-12-31T00:60:00.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect mins caught." );
$date_time = '1899-12-31T00:00:60.000';
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect secs caught." );
$date_time = '1899-12-31T00:00:59.999999999999999999';
# Workaround for increased precision with longdouble perls.
$date_time .= "9" x length (1 - 1e-16);
$fail = !$worksheet->convert_date_time( $date_time );
ok( $fail, " Testing incorrect time: $date_time\tincorrect secs caught." );
##############################################################################
#
# Test the time data generated in Excel.
#
while ( ) {
last if /^# stop/; # For debugging
next unless /\S/; # Ignore blank lines
next if /^#/; # Ignore comments
if ( /"DateTime">([^<]+)/ ) {
my $date_time = $1;
my $line = ;
if ( $line =~ /"Number">([^<]+)/ ) {
my $number = 0 + $1;
my $result = $worksheet->convert_date_time( $date_time );
$result = -1 unless defined $result;
ok( flt_cmp( $number, $result ),
" Testing convert_date_time: $date_time $number" )
or diag( "difference between $number and $result\n" . "= "
. abs( $number - $result ) . "\n"
. "> $flt_delta" );
}
}
}
__DATA__
# Test data taken from Excel in XML format.
1899-12-31T00:00:00.000 |
0 |
1899-12-31T00:15:20.213 |
1.0650613425925924E-2 |
1899-12-31T00:16:48.290 |
1.1670023148148148E-2 |
1899-12-31T00:55:25.446 |
3.8488958333333337E-2 |
1899-12-31T01:02:46.891 |
4.3598275462962965E-2 |
1899-12-31T01:04:15.597 |
4.4624965277777782E-2 |
1899-12-31T01:09:40.889 |
4.8389918981481483E-2 |
1899-12-31T01:11:32.560 |
4.9682407407407404E-2 |
1899-12-31T01:30:19.169 |
6.2721863425925936E-2 |
1899-12-31T01:48:25.580 |
7.5296064814814809E-2 |
1899-12-31T02:03:31.919 |
8.5786099537037031E-2 |
1899-12-31T02:11:11.986 |
9.1110949074074077E-2 |
1899-12-31T02:24:37.095 |
0.10042934027777778 |
1899-12-31T02:35:07.220 |
0.1077224537037037 |
1899-12-31T02:45:12.109 |
0.11472348379629631 |
1899-12-31T03:06:39.990 |
0.12962951388888888 |
1899-12-31T03:08:08.251 |
0.13065105324074075 |
1899-12-31T03:19:12.576 |
0.13833999999999999 |
1899-12-31T03:29:42.574 |
0.14563164351851851 |
1899-12-31T03:37:30.813 |
0.1510510763888889 |
1899-12-31T04:14:38.231 |
0.1768313773148148 |
1899-12-31T04:16:28.559 |
0.17810832175925925 |
1899-12-31T04:17:58.222 |
0.17914608796296297 |
1899-12-31T04:21:41.794 |
0.18173372685185185 |
1899-12-31T04:56:35.792 |
0.2059698148148148 |
1899-12-31T05:25:14.885 |
0.22586672453703704 |
1899-12-31T05:26:05.724 |
0.22645513888888891 |
1899-12-31T05:46:44.068 |
0.24078782407407406 |
1899-12-31T05:48:01.141 |
0.2416798726851852 |
1899-12-31T05:53:52.315 |
0.24574438657407408 |
1899-12-31T06:14:48.580 |
0.26028449074074073 |
1899-12-31T06:46:15.738 |
0.28212659722222222 |
1899-12-31T07:31:20.407 |
0.31343063657407405 |
1899-12-31T07:58:33.754 |
0.33233511574074076 |
1899-12-31T08:07:43.130 |
0.33869363425925925 |
1899-12-31T08:29:11.091 |
0.35360059027777774 |
1899-12-31T09:08:15.328 |
0.380732962962963 |
1899-12-31T09:30:41.781 |
0.39631690972222228 |
1899-12-31T09:34:04.462 |
0.39866275462962958 |
1899-12-31T09:37:23.945 |
0.40097158564814817 |
1899-12-31T09:37:56.655 |
0.40135017361111114 |
1899-12-31T09:45:12.230 |
0.40639155092592594 |
1899-12-31T09:54:14.782 |
0.41267108796296298 |
1899-12-31T09:54:22.108 |
0.41275587962962962 |
1899-12-31T10:01:36.151 |
0.41777952546296299 |
1899-12-31T12:09:48.602 |
0.50681252314814818 |
1899-12-31T12:34:08.549 |
0.52371005787037039 |
1899-12-31T12:56:06.495 |
0.53896406249999995 |
1899-12-31T12:58:58.217 |
0.54095158564814816 |
1899-12-31T12:59:54.263 |
0.54160026620370372 |
1899-12-31T13:34:41.331 |
0.56575614583333333 |
1899-12-31T13:58:28.601 |
0.58227547453703699 |
1899-12-31T14:02:16.899 |
0.58491781249999997 |
1899-12-31T14:36:17.444 |
0.60853523148148148 |
1899-12-31T14:37:57.451 |
0.60969271990740748 |
1899-12-31T14:57:42.757 |
0.6234115393518519 |
1899-12-31T15:10:48.307 |
0.6325035532407407 |
1899-12-31T15:14:39.890 |
0.63518391203703706 |
1899-12-31T15:19:47.988 |
0.63874986111111109 |
1899-12-31T16:04:24.344 |
0.66972620370370362 |
1899-12-31T16:22:23.952 |
0.68222166666666662 |
1899-12-31T16:29:55.999 |
0.6874536921296297 |
1899-12-31T16:58:20.259 |
0.70717892361111112 |
1899-12-31T17:04:02.415 |
0.71113906250000003 |
1899-12-31T17:18:29.630 |
0.72117627314814825 |
1899-12-31T17:47:21.323 |
0.74121901620370367 |
1899-12-31T17:53:29.866 |
0.74548456018518516 |
1899-12-31T17:53:41.076 |
0.74561430555555563 |
1899-12-31T17:55:06.044 |
0.74659773148148145 |
1899-12-31T18:14:49.151 |
0.760291099537037 |
1899-12-31T18:17:45.738 |
0.76233493055555546 |
1899-12-31T18:29:59.700 |
0.77082986111111118 |
1899-12-31T18:33:21.233 |
0.77316241898148153 |
1899-12-31T19:14:24.673 |
0.80167445601851861 |
1899-12-31T19:17:12.816 |
0.80362055555555545 |
1899-12-31T19:23:36.418 |
0.80806039351851855 |
1899-12-31T19:46:25.908 |
0.82391097222222232 |
1899-12-31T20:07:47.314 |
0.83874206018518516 |
1899-12-31T20:31:37.603 |
0.85529633101851854 |
1899-12-31T20:39:57.770 |
0.86108530092592594 |
1899-12-31T20:50:17.067 |
0.86825309027777775 |
1899-12-31T21:02:57.827 |
0.87705818287037041 |
1899-12-31T21:23:05.519 |
0.891036099537037 |
1899-12-31T21:34:49.572 |
0.89918486111111118 |
1899-12-31T21:39:05.944 |
0.90215212962962965 |
1899-12-31T21:39:18.426 |
0.90229659722222222 |
1899-12-31T21:46:07.769 |
0.90703436342592603 |
1899-12-31T21:57:55.662 |
0.91522756944444439 |
1899-12-31T22:19:11.732 |
0.92999689814814823 |
1899-12-31T22:23:51.376 |
0.93323351851851843 |
1899-12-31T22:27:58.771 |
0.93609688657407408 |
1899-12-31T22:43:30.392 |
0.94687953703703709 |
1899-12-31T22:48:25.834 |
0.95029900462962968 |
1899-12-31T22:53:51.727 |
0.95407091435185187 |
1899-12-31T23:12:56.536 |
0.96732101851851848 |
1899-12-31T23:15:54.109 |
0.96937626157407408 |
1899-12-31T23:17:12.632 |
0.97028509259259266 |
1899-12-31T23:59:59.999 |
0.99999998842592586 |
Excel-Writer-XLSX-0.76/t/worksheet/sub_extract_filter_tokens.t 000644 000765 000024 00000004530 12241403706 024534 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the token extraction method used to parse autofilter expressions.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet = _new_worksheet( \$got );
###############################################################################
#
# Test cases structured as [$input, [@expected_output]]
#
my @tests = (
[
undef,
[],
],
[
'',
[],
],
[
'0 < 2000',
[0, '<', 2000],
],
[
'x < 2000',
['x', '<', 2000],
],
[
'x > 2000',
['x', '>', 2000],
],
[
'x == 2000',
['x', '==', 2000],
],
[
'x > 2000 and x < 5000',
['x', '>', 2000, 'and', 'x', '<', 5000],
],
[
'x = "foo"',
['x', '=', 'foo'],
],
[
'x = foo',
['x', '=', 'foo'],
],
[
'x = "foo bar"',
['x', '=', 'foo bar'],
],
[
'x = "foo "" bar"',
['x', '=', 'foo " bar'],
],
[
'x = "foo bar" or x = "bar foo"',
['x', '=', 'foo bar', 'or', 'x', '=', 'bar foo'],
],
[
'x = "foo "" bar" or x = "bar "" foo"',
['x', '=', 'foo " bar', 'or', 'x', '=', 'bar " foo'],
],
[
'x = """"""""',
['x', '=', '"""'],
],
[
'x = Blanks',
['x', '=', 'Blanks'],
],
[
'x = NonBlanks',
['x', '=', 'NonBlanks'],
],
[
'top 10 %',
['top', 10, '%'],
],
[
'top 10 items',
['top', 10, 'items'],
],
);
###############################################################################
#
# Run the test cases.
#
for my $aref ( @tests ) {
my $expression = $aref->[0];
my $expected = $aref->[1];
my @results = $worksheet->_extract_filter_tokens( $expression );
my $testname = $expression || 'none';
_is_deep_diff( \@results, $expected, " \t" . $testname );
}
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_parse_filter_expression.t 000644 000765 000024 00000005116 12241403706 025071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the token extraction method used to parse autofilter expressions.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 24;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet = _new_worksheet( \$got );
###############################################################################
#
# Test cases structured as [$input, [@expected_output]]
#
my @tests = (
[
'x = 2000',
[2, 2000],
],
[
'x == 2000',
[2, 2000],
],
[
'x =~ 2000',
[2, 2000],
],
[
'x eq 2000',
[2, 2000],
],
[
'x <> 2000',
[5, 2000],
],
[
'x != 2000',
[5, 2000],
],
[
'x ne 2000',
[5, 2000],
],
[
'x !~ 2000',
[5, 2000],
],
[
'x > 2000',
[4, 2000],
],
[
'x < 2000',
[1, 2000],
],
[
'x >= 2000',
[6, 2000],
],
[
'x <= 2000',
[3, 2000],
],
[
'x > 2000 and x < 5000',
[4, 2000, 0, 1, 5000],
],
[
'x > 2000 && x < 5000',
[4, 2000, 0, 1, 5000],
],
[
'x > 2000 or x < 5000',
[4, 2000, 1, 1, 5000],
],
[
'x > 2000 || x < 5000',
[4, 2000, 1, 1, 5000],
],
[
'x = Blanks',
[2, 'blanks'],
],
[
'x = NonBlanks',
[5, ' '],
],
[
'x <> Blanks',
[5, ' '],
],
[
'x <> NonBlanks',
[2, 'blanks'],
],
[
'Top 10 Items',
[30, 10],
],
[
'Top 20 %',
[31, 20],
],
[
'Bottom 5 Items',
[32, 5],
],
[
'Bottom 101 %',
[33, 101],
],
);
###############################################################################
#
# Run the test cases.
#
for my $aref ( @tests ) {
my $expression = $aref->[0];
my $expected = $aref->[1];
my @tokens = $worksheet->_extract_filter_tokens( $expression );
my @results = $worksheet->_parse_filter_expression( $expression, @tokens );
my $testname = $expression || 'none';
is_deeply( \@results, $expected, " \t" . $testname );
}
Excel-Writer-XLSX-0.76/t/worksheet/sub_position_object.t 000644 000765 000024 00000006214 12241403706 023325 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# Tests for the _position_object_emus method used to calcualte the twoCellAnchor
# positions for drawing and chart objects.
#
# reverse ('(c)'), March 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_worksheet _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my @expected;
my @got;
my $tmp = '';
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 11, 22, 304800, 76200, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 2. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 12, 22, 0, 76200, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
$worksheet->set_column( 'L:L', 3.86 );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 3. Test _position_object_emus() for chart vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 12, 23, 0, 0, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
$worksheet->set_column( 'L:L', 3.86 );
$worksheet->set_row( 22, 6 );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 480, 288 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 4. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 0, 0, 4, 9, 304800, 114300, 2438400, 1524000 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 0, 0, 32, 32 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 5. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 4, 8, 19050, 28575, 5, 11, 95250, 142875, 2457450, 1552575 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 4, 8, 2, 3, 72, 72 );
_is_deep_diff( \@got, \@expected, $caption );
###############################################################################
#
# 6. Test _position_object_emus() for image vertices.
#
$caption = " \tWorksheet: _position_object_emus()";
@expected = ( 5, 1, 19050, 28575, 6, 4, 352425, 114300, 3067050, 219075 );
$worksheet = _new_worksheet( \$tmp );
@got = $worksheet->_position_object_emus( 5, 1, 2, 3, 99, 69 );
_is_deep_diff( \@got, \@expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_repeat_formula.t 000644 000765 000024 00000005400 12241403706 023134 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $formula;
my $row;
my $col;
my $worksheet = _new_worksheet(\$got);
my $format = undef;
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A1:A10)';
$row = 1;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A2:A10)';
$row = 2;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, 'A1', 'A2' );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'SUM(A2:A10)';
$row = 3;
$col = 0;
$formula = $worksheet->store_formula( '=SUM(A1:A10)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, qr/^A1$/, 'A2' );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'A2+A2';
$row = 4;
$col = 0;
$formula = $worksheet->store_formula( 'A1+A1' );
$worksheet->repeat_formula( $row, $col, $formula, $format, ('A1', 'A2') x 2 );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
###############################################################################
#
# Test the store_formula/repeat_formula methods.
#
$caption = " \tWorksheet: repeat_formula()";
$expected = 'A10 + SIN(A10)';
$row = 5;
$col = 0;
$formula = $worksheet->store_formula( 'A1 + SIN(A1)' );
$worksheet->repeat_formula( $row, $col, $formula, $format, (qr/^A1$/, 'A10') x 2 );
$got = $worksheet->{_table}->{$row}->{$col}->[1];
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_auto_filter.t 000644 000765 000024 00000031347 12241403706 023667 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 21;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $filter;
my @matches;
###############################################################################
#
# Test the _write_auto_filter() method with no filter.
#
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column()" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East or x == North';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == East and x == North';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != East';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == S*'; # Begins with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != S*'; # Doesn't begin with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == *h'; # Ends with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != *h'; # Doesn't end with character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x =~ *o*'; # Contains character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x !~ *r*'; # Doesn't contain character.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x == 1000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x != 2000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x > 3000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x >= 4000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x < 5000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x <= 6000';
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter() method for the following filter:
#
$filter = 'x >= 1000 and x <= 2000'; # Between.
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'C', $filter );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '$filter' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( East );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'A', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( East North );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'A', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
###############################################################################
#
# Test the _write_auto_filter_list() method for the following filter:
#
@matches = qw( February January July June );
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_name} = 'Sheet1';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column_list( 'D', @matches );
$worksheet->_write_auto_filter();
is( $got, $expected, " \tWorksheet: filter_column( '@matches' )" );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_brk.t 000644 000765 000024 00000001430 12241403706 022116 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_brk() method.
#
$caption = " \tWorksheet: _write_brk()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_brk( 1, 16383 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_cell.t 000644 000765 000024 00000004467 12241403706 022274 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = undef;
###############################################################################
#
# Test the _write_cell() method for numbers.
#
$caption = " \tWorksheet: _write_cell()";
$expected = '1';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 0, 0, [ 'n', 1 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for strings.
#
$caption = " \tWorksheet: _write_cell()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 3, 1, [ 's', 0 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for formulas with an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'A3+A50';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 1, 2, [ 'f', 'A3+A5', $format, 0 ] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for formulas without an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'A3+A50';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 1, 2, [ 'f', 'A3+A5'] );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_cell() method for array formulas with an optional value.
#
$caption = " \tWorksheet: _write_cell()";
$expected = 'SUM(B1:C1*B2:C2)9500';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell( 0, 0, [ 'a', 'SUM(B1:C1*B2:C2)', $format, 'A1', 9500 ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_cell_value.t 000644 000765 000024 00000001416 12241403706 023457 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_cell_value() method.
#
$caption = " \tWorksheet: _write_cell_value()";
$expected = '1';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_cell_value(1);
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_col_breaks.t 000644 000765 000024 00000002551 12241403706 023451 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_col_breaks() method.
#
$caption = " \tWorksheet: _write_col_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_vbreaks} = [1];
$worksheet->_write_col_breaks();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_col_breaks() method.
#
$caption = " \tWorksheet: _write_col_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_vbreaks} = [8, 3, 1, 0];
$worksheet->_write_col_breaks();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_col_info.t 000644 000765 000024 00000007300 12241403706 023132 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $min;
my $max;
my $width;
my $format;
my $hidden;
my $level;
my $collapsed;
###############################################################################
#
# 1. Test the _write_col_info() method.
#
$min = 1;
$max = 3;
$width = 5;
$format = undef;
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_col_info() method.
#
$min = 5;
$max = 5;
$width = 8;
$format = undef;
$hidden = 1;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_col_info() method.
#
$min = 7;
$max = 7;
$width = undef;
$format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_col_info() method.
#
$min = 8;
$max = 8;
$width = 8.43;
$format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_col_info() method.
#
$min = 9;
$max = 9;
$width = 2;
$format = undef;
$hidden = 0;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_col_info() method.
#
$min = 11;
$max = 11;
$width = undef;
$format = undef;
$hidden = 1;
$level = 0;
$collapsed = 0;
$caption = " \tWorksheet: _write_col_info( $min, $max )";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_col_info( $min, $max, $width, $format, $hidden );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_conditional_formatting.t 000644 000765 000024 00000006155 12241403706 026106 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( \{}, \{} );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '5';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '30';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A2',
{
type => 'cell',
format => $format,
criteria => 'less than',
value => 30
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '50';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A3',
{
type => 'cell',
format => undef,
criteria => '>=',
value => 50
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_conditional_formatting() method.
#
$caption = " \tWorksheet: _write_conditional_formatting()";
$expected = '1020';
$worksheet = _new_worksheet(\$got);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'between',
minimum => 10,
maximum => 20,
}
);
$worksheet->_write_conditional_formats();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_custom_filter.t 000644 000765 000024 00000001506 12241403706 024223 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_custom_filter() method.
#
$caption = " \tWorksheet: _write_custom_filter()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filter( 4, 3000 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_custom_filters.t 000644 000765 000024 00000002467 12241403706 024415 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_custom_filters() method.
#
$caption = " \tWorksheet: _write_custom_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filters( 4, 4000 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_custom_filters() method.
#
$caption = " \tWorksheet: _write_custom_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_custom_filters( 4, 3000, 0, 1, 8000 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_data_validations_01.t 000644 000765 000024 00000015012 12241403706 025147 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet data validation methods.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Data validation example 1 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A1',
{
validate => 'integer',
criteria => '>',
value => 0,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 1 from docs (with options turned off).
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A1',
{
validate => 'integer',
criteria => '>',
value => 0,
ignore_blank => 0,
show_input => 0,
show_error => 0,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 2 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = 'E3';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A2',
{
validate => 'integer',
criteria => '>',
value => '=E3',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 3 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '0.10.5';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A3',
{
validate => 'decimal',
criteria => 'between',
minimum => 0.1,
maximum => 0.5,
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 4 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '"open,high,close"';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A4',
{
validate => 'list',
source => [ 'open', 'high', 'close' ],
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 5 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '$E$4:$G$4';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A5',
{
validate => 'list',
source => '=$E$4:$G$4',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 6 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '3944839794';
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->data_validation(
'A6',
{
validate => 'date',
criteria => 'between',
minimum => '2008-01-01T',
maximum => '2008-12-12T',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Data validation example 7 from docs.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '1100';
$worksheet = _new_worksheet(\$got);
$worksheet->data_validation(
'A7',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 100,
input_title => 'Enter an integer:',
input_message => 'between 1 and 100',
}
);
$worksheet->_write_data_validations();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_data_validations_02.t 000644 000765 000024 00000074235 12241403706 025164 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet data validation methods.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 44;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test 1 Integer between 1 and 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer between";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 2 Integer not between 1 and 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'not between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer not between";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 3,4,5 Integer == 1.
#
for my $operator ( 'equal to', '=', '==' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer equal to";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 6,7,8 Integer != 1.
#
for my $operator ( 'not equal to', '<>', '!=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer not equal to";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 9,10 Integer > 1.
#
for my $operator ( 'greater than', '>' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer >";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 11,12 Integer < 1.
#
for my $operator ( 'less than', '<' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer <";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 13,14 Integer >= 1.
#
for my $operator ( 'greater than or equal to', '>=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer >=";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 15,16 Integer <= 1.
#
for my $operator ( 'less than or equal to', '<=' ) {
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => $operator,
value => 1,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: integer <=";
$expected = '1';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
}
###############################################################################
#
# Test 17 Integer between 1 and 10 (same as test 1) + Ignore blank off.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
ignore_blank => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: ignore blank off";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 18 Integer between 1 and 10 (same as test 1) + Error style == warning..
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
error_type => 'warning',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: error style = warning";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 19 Integer between 1 and 10 (same as test 1) + Error style == infor..
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
error_type => 'information',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: error style = information";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 20 Integer between 1 and 10 (same as test 1)
# + input title.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: with input title";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 21 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + input message";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 22 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + error title";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 23 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: + error message";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 24 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
# - input message box.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
show_input => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: no input box";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 25 Integer between 1 and 10 (same as test 1)
# + input title.
# + input message.
# + error title.
# + error message.
# - input message box.
# - error message box.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
input_title => 'Input title January',
input_message => 'Input message February',
error_title => 'Error title March',
error_message => 'Error message April',
show_input => 0,
show_error => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: no error box";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 26 'Any' value shouldn't produce a DV record.
#
$got = '';
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation( 'B5', { validate => 'any', } );
$worksheet->_write_data_validations();
$caption = " \tData validation api: any validation";
$expected = '';
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 27 Decimal = 1.2345
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'decimal',
criteria => '==',
value => 1.2345,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: decimal validation";
$expected = '1.2345';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 28 List = a,bb,ccc
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'list',
source => [ 'a', 'bb', 'ccc' ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: explicit list";
$expected = '"a,bb,ccc"';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 29 List = a,bb,ccc, No dropdown
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'list',
source => [ 'a', 'bb', 'ccc' ],
dropdown => 0,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: list with no dropdown";
$expected = '"a,bb,ccc"';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 30 List = $D$1:$D$5
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'A1:A1',
{
validate => 'list',
source => '=$D$1:$D$5',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: list with range";
$expected = '$D$1:$D$5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 31 Date = 39653 (2008-07-24)
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => '==',
value => 39653,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date";
$expected = '39653';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 32 Date = 2008-07-24T
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => '==',
value => '2008-07-24T',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date auto";
$expected = '39653';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 33 Date between ranges.
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'date',
criteria => 'between',
minimum => '2008-01-01T',
maximum => '2008-12-12T',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: date auto, between";
$expected = '3944839794';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 34 Time = 0.5 (12:00:00)
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5:B5',
{
validate => 'time',
criteria => '==',
value => 0.5,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: time";
$expected = '0.5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 35 Time = T12:00:00
#
$worksheet = _new_worksheet( \$got );
$worksheet->{_1904} = 0;
$worksheet->data_validation(
'B5',
{
validate => 'time',
criteria => '==',
value => 'T12:00:00',
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: time auto";
$expected = '0.5';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 36 Custom == 10.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'Custom',
criteria => '==',
value => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: custom";
$expected = '10';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 37 Check the row/col processing: single A1 style cell.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 38 Check the row/col processing: single A1 style range.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5:B10',
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 39 Check the row/col processing: single (row, col) style cell.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 40 Check the row/col processing: single (row, col) style range.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1, 9, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 41 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 4, 3, 4, 3 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 42 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 6, 1, 6, 1 ], [ 8, 1, 8, 1 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 43 Check the row/col processing: multiple (row, col) style cells.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
4, 1, 8, 1,
{
validate => 'integer',
criteria => 'between',
minimum => 1,
maximum => 10,
other_cells => [ [ 3, 3, 3, 3 ] ],
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: range options";
$expected = '110';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Test 44 Multiple validations.
#
$worksheet = _new_worksheet( \$got );
$worksheet->data_validation(
'B5',
{
validate => 'integer',
criteria => '>',
value => 10,
}
);
$worksheet->data_validation(
'C10',
{
validate => 'integer',
criteria => '<',
value => 10,
}
);
$worksheet->_write_data_validations();
$caption = " \tData validation api: multiple validations";
$expected = '1010';
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_dimension.t 000644 000765 000024 00000011324 12241403706 023330 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 10;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $cell_ref;
###############################################################################
#
# 1. Test the _write_dimension() method with no dimensions set.
#
$caption = " \tWorksheet: _write_dimension(undef)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'XFD1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'XFD1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( $cell_ref, 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:B2';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'A1', 'some string' );
$worksheet->write( 'B2', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:B2';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'B2', 'some string' );
$worksheet->write( 'A1', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'B2:H11';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'B2', 'some string' );
$worksheet->write( 'H11', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_dimension() method with dimensions set.
#
$cell_ref = 'A1:XFD1048576';
$caption = " \tWorksheet: _write_dimension('$cell_ref')";
$expected = qq();
$worksheet = _new_worksheet(\$got);
$worksheet->write( 'A1', 'some string' );
$worksheet->write( 'XFD1048576', 'some string' );
$worksheet->_write_dimension();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_filter.t 000644 000765 000024 00000001422 12241403706 022626 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filter() method.
#
$caption = " \tWorksheet: _write_filter()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filter( 'East' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_filter_column.t 000644 000765 000024 00000001553 12241403706 024210 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filter_column() method.
#
$caption = " \tWorksheet: _write_filter_column()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_filter_column( 0, 1, ['East'] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_filters.t 000644 000765 000024 00000002720 12241403706 023013 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'East' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'East', 'South' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_filters() method.
#
$caption = " \tWorksheet: _write_filters()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_filters( 'blanks' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_header_footer.t 000644 000765 000024 00000004757 12241403706 024165 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_odd_header() method.
#
$caption = " \tWorksheet: _write_odd_header()";
$expected = 'Page &P of &N';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->_write_odd_header();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_odd_footer() method.
#
$caption = " \tWorksheet: _write_odd_footer()";
$expected = '&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('&F');
$worksheet->_write_odd_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Header only.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = 'Page &P of &N';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Footer only.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = '&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('&F');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_header_footer() method. Header and footer.
#
$caption = " \tWorksheet: _write_header_footer()";
$expected = 'Page &P of &N&F';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('Page &P of &N');
$worksheet->set_footer('&F');
$worksheet->_write_header_footer();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_hyperlink.t 000644 000765 000024 00000004140 12241403706 023346 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_hyperlink_external() method.
#
$caption = " \tWorksheet: _write_hyperlink_external()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_external( 0, 0, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 0, 0, 'Sheet2!A1', 'Sheet2!A1' );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = q();
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 4, 0, "'Data Sheet'!D5", "'Data Sheet'!D5" );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_hyperlink_internal() method.
#
$caption = " \tWorksheet: _write_hyperlink_internal()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_hyperlink_internal( 17, 0, 'Sheet2!A1', 'Sheet2!A1', 'Screen Tip 1' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_legacy_drawing.t 000644 000765 000024 00000001512 12241403706 024320 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_legacy_drawing() method.
#
$caption = " \tWorksheet: _write_legacy_drawing()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_has_vml} = 1;
$worksheet->_write_legacy_drawing();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_merge_cell.t 000644 000765 000024 00000001451 12241403706 023441 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_merge_cell() method.
#
$caption = " \tWorksheet: _write_merge_cell()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_merge_cell( [ 2, 1, 2, 2 ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_merge_cells.t 000644 000765 000024 00000003611 12241403706 023624 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Excel::Writer::XLSX::Format;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( 0 );
###############################################################################
#
# Test the _write_merge_cells() method. With $row, $col notation.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 2, 1, 2, 2, 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_merge_cells() method. With A1 notation.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_merge_cells() method. With more than one range.
#
$caption = " \tWorksheet: _write_merge_cells()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->merge_range( 'A2:D2', 'Foo', $format);
$worksheet->_write_merge_cells();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_page_margins.t 000644 000765 000024 00000012007 12241403706 023776 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 11;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins_LR(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margins_TB(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_left(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_right(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_top(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_margin_bottom(0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_header('', 0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_footer('', 0.5);
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_margins() method.
#
$caption = " \tWorksheet: _write_page_margins()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Test numeric value with whitespace.
$worksheet->set_margins( " 0.5\n");
$worksheet->_write_page_margins();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_page_set_up_pr.t 000644 000765 000024 00000001510 12241403706 024333 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_set_up_pr() method.
#
$caption = " \tWorksheet: _write_page_set_up_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_fit_page} = 1;
$worksheet->_write_page_set_up_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_page_setup.t 000644 000765 000024 00000004542 12241403706 023503 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_page_setup() method. Without any page setup.
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
$got = ''; # Reset after previous undef value;
###############################################################################
#
# Test the _write_page_setup() method. With set_landscape();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_landscape();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With set_portrait();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_portrait();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With set_paper();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->set_paper( 9 );
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_page_setup() method. With print_across();
#
$caption = " \tWorksheet: _write_page_setup()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->print_across();
$worksheet->_write_page_setup();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_pane.t 000644 000765 000024 00000013363 12241403706 022273 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 14;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1, 1 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 1, 0, 19 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_panes() method.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->freeze_panes( 3, 6, 3, 6, 1);
$worksheet->_write_panes();
is( $got, $expected, $caption );
# Split panes tests.
###############################################################################
#
# 7. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 15 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 30 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 105 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 11. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 17.57 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 12. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 0, 45 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 13. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 15, 8.43 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
###############################################################################
#
# 14. Test the _write_panes() method. Split panes.
#
$caption = " \tWorksheet: _write_panes()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_panes();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_phonetic_pr.t 000644 000765 000024 00000001464 12241403706 023661 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_phonetic_pr() method.
#
$caption = " \tWorksheet: _write_phonetic_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_phonetic_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_print_options.t 000644 000765 000024 00000006551 12241403706 024260 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_print_options() method. Without any options.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->_write_print_options();
is( $got, $expected, $caption );
$got = ''; # Reset after previous undef value;
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_horizontally();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_vertically();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->center_horizontally();
$worksheet->center_vertically();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines();
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines(0);
$worksheet->_write_print_options();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines();
$worksheet->_write_print_options(1);
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_print_options() method.
#
$caption = " \tWorksheet: _write_print_options()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->hide_gridlines(0);
$worksheet->_write_print_options(2);
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_row.t 000644 000765 000024 00000006201 12241403706 022150 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
###############################################################################
#
# 1. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 0 );
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 2, '2:2' );
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 1, undef, 30 );
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 3, undef, undef, undef, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 6, undef, undef, $format );
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 9, undef, 3 );
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_row() method.
#
$caption = " \tWorksheet: _write_row()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_row( 12, undef, 24, undef, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_empty_row() method.
#
$caption = " \tWorksheet: _write_empty_row()";
$expected = '
';
$worksheet = _new_worksheet( \$got );
$worksheet->_write_empty_row( 12, undef, 24, undef, 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_row_breaks.t 000644 000765 000024 00000002543 12241403706 023504 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_row_breaks() method.
#
$caption = " \tWorksheet: _write_row_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_hbreaks} = [1];
$worksheet->_write_row_breaks();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_row_breaks() method.
#
$caption = " \tWorksheet: _write_row_breaks()";
$expected = '';
$worksheet = _new_worksheet( \$got );
$worksheet->{_hbreaks} = [15, 7, 3, 0];
$worksheet->_write_row_breaks();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_selection.t 000644 000765 000024 00000001474 12241403706 023335 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_selection() method.
#
$caption = " \tWorksheet: _write_selection()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_selection( undef, 'A1', 'A1' );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_calc_pr.t 000644 000765 000024 00000001457 12241403706 024144 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_calc_pr() method.
#
$caption = " \tWorksheet: _write_sheet_calc_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_calc_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_data.t 000644 000765 000024 00000001421 12241403706 023441 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_data() method.
#
$caption = " \tWorksheet: _write_sheet_data()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_data();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_format_pr.t 000644 000765 000024 00000001472 12241403706 024527 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_format_pr() method.
#
$caption = " \tWorksheet: _write_sheet_format_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_format_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_pr.t 000644 000765 000024 00000003445 12241403706 023161 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->{_fit_page} = 1;
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->set_tab_color( 'red' );
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_pr() method.
#
$caption = " \tWorksheet: _write_sheet_pr()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->{_fit_page} = 1;
$worksheet->set_tab_color( 'red' );
$worksheet->_write_sheet_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_protection.t 000644 000765 000024 00000023222 12241403706 024721 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 18;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
my $password;
my %options;
###############################################################################
#
# 1. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ();
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = 'password';
%options = ();
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( select_locked_cells => 0 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_cells => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 9. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( insert_hyperlinks => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 10. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( delete_columns => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 11. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( delete_rows => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 12. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( sort => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 13. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( autofilter => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 14. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( pivot_tables => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 15. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( objects => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 16. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( scenarios => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 17. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = '';
%options = ( format_cells => 1, select_locked_cells => 0, select_unlocked_cells => 0 );
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
###############################################################################
#
# 18. Test the _write_sheet_protection() method.
#
$caption = " \tWorksheet: _write_sheet_protection()";
$expected = '';
$password = 'drowssap';
%options = (
objects => 1,
scenarios => 1,
format_cells => 1,
format_columns => 1,
format_rows => 1,
insert_columns => 1,
insert_rows => 1,
insert_hyperlinks => 1,
delete_columns => 1,
delete_rows => 1,
select_locked_cells => 0,
sort => 1,
autofilter => 1,
pivot_tables => 1,
select_unlocked_cells => 0,
);
$worksheet = _new_worksheet(\$got);
$worksheet->protect( $password, \%options );
$worksheet->_write_sheet_protection();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_view.t 000644 000765 000024 00000005701 12241403706 023507 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_sheet_view() method. Tab not selected.
#
$caption = " \tWorksheet: _write_sheet_view()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected.
#
$caption = " \tWorksheet: _write_sheet_view()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines();
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(0)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 0 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(1)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 1 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet_view() method. Tab selected + hide_gridlines().
#
$caption = " \tWorksheet: _write_sheet_view() + hide_gridlines(2)";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_gridlines( 2 );
$worksheet->_write_sheet_view();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views1.t 000644 000765 000024 00000006133 12241403706 023753 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# 1. Test the _write_sheet_views() method.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_zoom( 100 ); # Default. Should be ignored.
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method. With zoom.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_zoom( 200 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method. Right to left.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->right_to_left();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method. Hide zeroes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->hide_zero();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method. Set page view mode.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_page_view();
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views2.t 000644 000765 000024 00000007274 12241403706 023763 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 5;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 1, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->freeze_panes( 3, 6, 3, 6, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views3.t 000644 000765 000024 00000012200 12241403706 023745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes tests.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 30 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 105 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 17.57 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 45 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views4.t 000644 000765 000024 00000012360 12241403706 023755 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 8;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Repeat of tests in sub_write_sheet_views3.t with explicit topLeft cells.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 0, 1, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 30, 0, 2, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 105, 0, 7, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 8.43, 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 17.57, 0, 2 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 0, 45, 0, 5 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 15, 8.43, 1, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 8. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->split_panes( 45, 54.14, 3, 6 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views5.t 000644 000765 000024 00000007754 12241403706 023771 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 7;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test for set_selection().
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'D3' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'D3:F4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'F4:D3' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 7. Test the _write_sheet_views() method with selection set.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2:A2' ); # Should be the same as 'A2'
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views6.t 000644 000765 000024 00000006471 12241403706 023765 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes with selection.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->freeze_panes( 1, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->freeze_panes( 0, 1 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I5' );
$worksheet->freeze_panes( 'G4' );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views7.t 000644 000765 000024 00000010714 12241403706 023761 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Freeze panes with shifted top left cell.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->freeze_panes( 1 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 1 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->freeze_panes( 0 , 1, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 0 , 1, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 5. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->freeze_panes( 3, 6, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with freeze panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A1' );
$worksheet->freeze_panes( 3, 6, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views8.t 000644 000765 000024 00000006423 12241403706 023764 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes with selection.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->split_panes( 15, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->split_panes( 0, 8.43 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes + selection.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I5' );
$worksheet->split_panes( 45, 54.14 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_sheet_views9.t 000644 000765 000024 00000011160 12241403706 023757 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Split panes with shifted top left cell.
#
###############################################################################
#
# 1. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A2' );
$worksheet->split_panes( 15 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 2. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'A21' );
$worksheet->split_panes( 15 , 0, 20, 0 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 3. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'B1' );
$worksheet->split_panes( 0, 8.43, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 4. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'E1' );
$worksheet->split_panes( 0, 8.43, 0, 4 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
__END__
TODO. The following are edge cases. They will probably need a change of API
to fix since the current API doesn't pass in enough information.
###############################################################################
#
# 5. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'G4' );
$worksheet->split_panes( 45, 54.14, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
###############################################################################
#
# 6. Test the _write_sheet_views() method with split panes.
#
$caption = " \tWorksheet: _write_sheet_views()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_selection( 'I7' );
$worksheet->split_panes( 45, 54.14, 6, 8 );
$worksheet->_write_sheet_views();
is( $got, $expected, $caption );
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_tab_color.t 000644 000765 000024 00000001626 12241403706 023313 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_tab_color() method.
#
$caption = " \tWorksheet: _write_tab_color()";
$expected = '';
$worksheet = _new_worksheet(\$got);
# Mock up the color palette.
$worksheet->{_tab_color} = 0x0A;
$worksheet->{_palette}->[2] = [ 0xff, 0x00, 0x00, 0x00 ];
$worksheet->_write_tab_color( );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_worksheet.t 000644 000765 000024 00000001635 12241403706 023362 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _write_worksheet() method.
#
$caption = " \tWorksheet: _write_worksheet()";
$expected = '';
$worksheet = _new_worksheet(\$got);
$worksheet->_write_worksheet();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/sub_write_xml_declaration.t 000644 000765 000024 00000001472 12241403706 024513 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_worksheet';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the xml_declaration() method.
#
$caption = " \tWorksheet: xml_declaration()";
$expected = qq(\n);
$worksheet = _new_worksheet(\$got);
$worksheet->xml_declaration();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_01.t 000644 000765 000024 00000002550 12241403706 021574 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_02.t 000644 000765 000024 00000002752 12241403706 021601 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->write('B3', 123);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
123
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_03.t 000644 000765 000024 00000004003 12241403706 021571 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test column formatting.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1, bold => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_column( 'B:D', 5 );
$worksheet->set_column( 'F:F', 8, undef, 1 );
$worksheet->set_column( 'H:H', undef, $format );
$worksheet->set_column( 'J:J', 2 );
$worksheet->set_column( 'L:L', undef, undef, 1 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_04.t 000644 000765 000024 00000003652 12241403706 021603 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test row formatting.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1, bold => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->set_row( 1, 30 );
$worksheet->set_row( 3, undef, undef, 1 );
$worksheet->set_row( 6, undef, $format );
$worksheet->set_row( 9, 3 );
$worksheet->set_row( 12, 24, undef, 1 );
$worksheet->set_row( 14, 0 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_array_formula_01.t 000644 000765 000024 00000005462 12241403706 024524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test array formulas.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = undef;
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->write( 'B1', [ [ 500, 10 ], [ 300, 15 ] ] );
$worksheet->write( 'B5', [ [ 1, 2, 3 ], [ 20234, 21003, 10000 ] ] );
$worksheet->write( 'A1', '{=SUM(B1:C1*B2:C2)}', $format, 9500 );
$worksheet->write_array_formula( 'A2:A2', '{=SUM(B1:C1*B2:C2)}', $format, 9500 );
$worksheet->write_array_formula( 'A5:A7', '{=TREND(C5:C7,B5:B7)}', $format, 22196 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
SUM(B1:C1*B2:C2)
9500
500
300
SUM(B1:C1*B2:C2)
9500
10
15
TREND(C5:C7,B5:B7)
22196
1
20234
0
2
21003
0
3
10000
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_01.t 000644 000765 000024 00000004337 12241403706 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => undef,
criteria => 'greater than',
value => 5,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
5
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_02.t 000644 000765 000024 00000004463 12241403706 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->write( 'B1', 5 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => undef,
criteria => 'greater than',
value => '$B$1',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
5
20
30
40
$B$1
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_03.t 000644 000765 000024 00000005135 12241403706 024153 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'cell',
format => undef,
criteria => 'between',
minimum => 20,
maximum => 30,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'cell',
format => undef,
criteria => 'not between',
minimum => 20,
maximum => 30,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
20
30
20
30
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_04.t 000644 000765 000024 00000004436 12241403706 024157 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'duplicate',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'unique',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_05.t 000644 000765 000024 00000010165 12241403706 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'equal or above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => 'equal or below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '1 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '1 std dev below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '2 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '2 std dev below',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '3 std dev above',
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'average',
format => undef,
criteria => '3 std dev below',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_06.t 000644 000765 000024 00000005451 12241403706 024157 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'top',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'bottom',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'top',
criteria => '%',
value => 10,
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'bottom',
criteria => '%',
value => 10,
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_07.t 000644 000765 000024 00000006276 12241403706 024166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'containing',
value => 'foo',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'not containing',
value => 'foo',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'b',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'b',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
NOT(ISERROR(SEARCH("foo",A1)))
ISERROR(SEARCH("foo",A1))
LEFT(A1,1)="b"
RIGHT(A1,1)="b"
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_08.t 000644 000765 000024 00000012250 12241403706 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'yesterday',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'today',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'tomorrow',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last 7 days',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'this week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'next week',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'last month',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'this month',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'time_period',
criteria => 'next month',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
FLOOR(A1,1)=TODAY()-1
FLOOR(A1,1)=TODAY()
FLOOR(A1,1)=TODAY()+1
AND(TODAY()-FLOOR(A1,1)<=6,FLOOR(A1,1)<=TODAY())
AND(TODAY()-ROUNDDOWN(A1,0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(A1,0)<(WEEKDAY(TODAY())+7))
AND(TODAY()-ROUNDDOWN(A1,0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(A1,0)-TODAY()<=7-WEEKDAY(TODAY()))
AND(ROUNDDOWN(A1,0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(A1,0)-TODAY()<(15-WEEKDAY(TODAY())))
AND(MONTH(A1)=MONTH(TODAY())-1,OR(YEAR(A1)=YEAR(TODAY()),AND(MONTH(A1)=1,YEAR(A1)=YEAR(TODAY())-1)))
AND(MONTH(A1)=MONTH(TODAY()),YEAR(A1)=YEAR(TODAY()))
AND(MONTH(A1)=MONTH(TODAY())+1,OR(YEAR(A1)=YEAR(TODAY()),AND(MONTH(A1)=12,YEAR(A1)=YEAR(TODAY())+1)))
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_09.t 000644 000765 000024 00000005520 12241403706 024157 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'blanks',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'no_blanks',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'errors',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'no_errors',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
LEN(TRIM(A1))=0
LEN(TRIM(A1))>0
ISERROR(A1)
NOT(ISERROR(A1))
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_10.t 000644 000765 000024 00000004417 12241403706 024153 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'date',
criteria => 'greater than',
value => '2011-01-01T',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
40544
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_11.t 000644 000765 000024 00000004510 12241403706 024146 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'date',
criteria => 'between',
minimum => '2011-01-01T',
maximum => '2011-12-31T',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
40544
40908
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_12.t 000644 000765 000024 00000006324 12241403706 024154 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '2_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_13.t 000644 000765 000024 00000006437 12241403706 024162 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_14.t 000644 000765 000024 00000006246 12241403706 024161 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => 'data_bar',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_15.t 000644 000765 000024 00000005672 12241403706 024164 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
my $format = undef;
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$1>5',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$2<80',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '"1+2"',
format => $format,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'formula',
criteria => '=$A$3>$A$4',
format => $format,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
$A$1>5
$A$2<80
"1+2"
$A$3>$A$4
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_16.t 000644 000765 000024 00000006600 12241403706 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
min_color => "#C5D9F1",
mid_color => "#8DB4E3",
max_color => "#538ED5",
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_17.t 000644 000765 000024 00000006730 12241403706 024162 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => '3_color_scale',
min_value => '$A$10',
mid_value => 52,
max_value => 99,
min_type => 'num',
mid_type => 'percent',
max_type => 'percentile',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_18.t 000644 000765 000024 00000006521 12241403706 024161 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( '=$A$3:$A$4,A1 , A6:$A$8 ,$A10 , A$12',
{
type => '3_color_scale',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_19.t 000644 000765 000024 00000006651 12241403706 024166 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->{_1904} = 0;
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 1 );
$worksheet->write( 'A2', 2 );
$worksheet->write( 'A3', 3 );
$worksheet->write( 'A4', 4 );
$worksheet->write( 'A5', 5 );
$worksheet->write( 'A6', 6 );
$worksheet->write( 'A7', 7 );
$worksheet->write( 'A8', 8 );
$worksheet->write( 'A9', 9 );
$worksheet->write( 'A10', 10 );
$worksheet->write( 'A11', 11 );
$worksheet->write( 'A12', 12 );
$worksheet->conditional_formatting( 'A1:A12',
{
type => 'data_bar',
min_value => 5,
mid_value => 52, # Should be ignored.
max_value => 90,
min_type => 'num',
mid_type => 'percentile', # Should be ignored.
max_type => 'percent',
bar_color => '#8DB4E3',
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
1
2
3
4
5
6
7
8
9
10
11
12
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_cond_format_20.t 000644 000765 000024 00000006220 12241403706 024146 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test conditional formats.
#
$caption = " \tWorksheet: _assemble_xml_file()";
$worksheet = _new_worksheet(\$got);
$worksheet->select();
# Start test code.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'b',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'begins with',
value => 'bc',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'z',
format => undef,
}
);
$worksheet->conditional_formatting( 'A1:A4',
{
type => 'text',
criteria => 'ends with',
value => 'yz',
format => undef,
}
);
# End test code.
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
10
20
30
40
LEFT(A1,1)="b"
LEFT(A1,2)="bc"
RIGHT(A1,1)="z"
RIGHT(A1,2)="yz"
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_merge_cells_01.t 000644 000765 000024 00000003312 12241403706 024132 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->merge_range( 'B3:C3', 'Foo', $format);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
0
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_merge_cells_02.t 000644 000765 000024 00000003755 12241403706 024146 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format1 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
my $format2 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 2 );
$worksheet = _new_worksheet(\$got);
$worksheet->select();
$worksheet->merge_range( 'B3:C3', 'Foo', $format1);
$worksheet->merge_range( 'A2:D2', undef, $format2);
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
0
Excel-Writer-XLSX-0.76/t/worksheet/worksheet_merge_cells_03.t 000644 000765 000024 00000006776 12241403706 024155 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Worksheet methods.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_worksheet);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $worksheet;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
# Test merged cells.
#
$caption = " \tWorksheet: _assemble_xml_file()";
my $format1 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 1 );
my $format2 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 2 );
my $format3 = Excel::Writer::XLSX::Format->new( {}, {}, xf_index => 3 );
$worksheet = _new_worksheet(\$got);
$worksheet->set_column('B:C', 12);
$worksheet->{_1904} = 0;
$worksheet->select();
$worksheet->merge_range_type( 'formula', 'B14:C14', '=1+2', $format1, 3 );
$worksheet->merge_range_type( 'number', 'B2:C2', 123, $format1 );
$worksheet->merge_range_type( 'string', 'B4:C4', 'foo', $format1 );
$worksheet->merge_range_type( 'blank', 'B6:C6', $format1 );
$worksheet->merge_range_type( 'rich_string', 'B8:C8', 'This is ', $format2, 'bold', $format1 );
$worksheet->merge_range_type( 'date_time', 'B10:C10', '2011-01-01T', $format2 );
$worksheet->merge_range_type( 'url', 'B12:C12', 'http://www.perl.com/', $format3 );
$worksheet->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
123
0
1
40544
2
1+2
3
Excel-Writer-XLSX-0.76/t/workbook/sub_close.t 000644 000765 000024 00000001737 12241403706 021067 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $filename = 'sub_close.xlsx';
my $dir = 't/regression/';
my $ext_filename = $dir . $filename;
my $scalar_target;
###############################################################################
#
# Test the close() method.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $ext_filename );
$workbook->add_worksheet();
ok( $workbook->close(), "\tWorkbook: close(), _internal_fh" );
unlink $ext_filename;
open( my $fh, '>', \$scalar_target );
$workbook = Excel::Writer::XLSX->new( $fh );
$workbook->add_worksheet();
ok( $workbook->close(), "\tWorkbook: close(), not _internal_fh" );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_get_chart_range.t 000644 000765 000024 00000006255 12241403706 023076 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_workbook);
use strict;
use warnings;
use Test::More tests => 7;
###############################################################################
#
# Tests setup.
#
my @expected;
my @got;
my $formula;
my $tmp_str = '';
my $caption;
my $workbook;
###############################################################################
#
# Test the _get_chart_range() method. Simple formula.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1:$B$5);
@expected = ( 'Sheet1', 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with space.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('Sheet 1'!$B$1:$B$5);
@expected = ( q(Sheet 1), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Singe cell range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1);
@expected = ( 'Sheet1', 0, 1, 0, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with an apostrophe.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('Don''t'!$B$1:$B$5);
@expected = ( q(Don't), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Sheet name with exclamation mark.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q('aa!bb'!$B$1:$B$5);
@expected = ( q(aa!bb), 0, 1, 4, 1 );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Invalid range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = '';
@expected = ( undef );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the _get_chart_range() method. Invalid 2D range.
#
$caption = " \tWorkbook: _get_chart_range()";
$formula = q(Sheet1!$B$1:$F$5);
@expected = ( undef );
$workbook = _new_workbook( \$tmp_str );
@got = $workbook->_get_chart_range( $formula );
is_deeply( \@got, \@expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_sort_defined_names.t 000644 000765 000024 00000006076 12241403706 023613 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_is_deep_diff';
use strict;
use warnings;
use Excel::Writer::XLSX::Workbook;
use Test::More tests => 2;
my $unsorted = [
[ "Bar", 1, q(Sheet2!$A$1) ],
[ "Bar", 0, q(Sheet1!$A$1) ],
[ "Abc", -1, q(Sheet1!$A$1) ],
[ "Baz", -1, 0.98 ],
[ "Bar", 2, q('Sheet 3'!$A$1) ],
[ "Foo", -1, q(Sheet1!$A$1) ],
[ "Print_Titler", -1, q(Sheet1!$A$1) ],
[ "Print_Titlet", -1, q(Sheet1!$A$1) ],
[ "_Fog", -1, q(Sheet1!$A$1) ],
[ "_Egg", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Titles", 0, q(Sheet1!$1:$1) ],
[ "_xlnm._FilterDatabase", 0, q(Sheet1!$G$1) ],
[ "aaa", 1, q(Sheet2!$A$1) ],
[ "_xlnm.Print_Area", 0, q(Sheet1!$A$1:$H$10) ],
[ "Car", 2, q("Saab 900") ],
];
my $expected = [
[ "_Egg", -1, q(Sheet1!$A$1) ],
[ "_xlnm._FilterDatabase", 0, q(Sheet1!$G$1) ],
[ "_Fog", -1, q(Sheet1!$A$1) ],
[ "aaa", 1, q(Sheet2!$A$1) ],
[ "Abc", -1, q(Sheet1!$A$1) ],
[ "Bar", 2, q('Sheet 3'!$A$1) ],
[ "Bar", 0, q(Sheet1!$A$1) ],
[ "Bar", 1, q(Sheet2!$A$1) ],
[ "Baz", -1, 0.98 ],
[ "Car", 2, q("Saab 900") ],
[ "Foo", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Area", 0, q(Sheet1!$A$1:$H$10) ],
[ "Print_Titler", -1, q(Sheet1!$A$1) ],
[ "_xlnm.Print_Titles", 0, q(Sheet1!$1:$1) ],
[ "Print_Titlet", -1, q(Sheet1!$A$1) ],
];
my @sorted = Excel::Writer::XLSX::Workbook::_sort_defined_names(@$unsorted);
my $got = \@sorted;
_is_deep_diff( $got, $expected );
#
# Also test the named ranges required by App generated from the sorted list.
#
my $named_ranges = [
q(_Egg),
q(_Fog),
q(Sheet2!aaa),
q(Abc),
q('Sheet 3'!Bar),
q(Sheet1!Bar),
q(Sheet2!Bar),
q(Foo),
q(Sheet1!Print_Area),
q(Print_Titler),
q(Sheet1!Print_Titles),
q(Print_Titlet),
];
$got = Excel::Writer::XLSX::Workbook::_extract_named_ranges(@sorted);
_is_deep_diff( $got, $named_ranges );
__END__
_Egg
_Fog
Sheet2!aaa
Abc
'Sheet 3'!Bar
Sheet1!Bar
Sheet2!Bar
Foo
Sheet1!Print_Area
Print_Titler
Sheet1!Print_Titles
Print_Titlet
Excel-Writer-XLSX-0.76/t/workbook/sub_write_book_views.t 000644 000765 000024 00000001547 12241403706 023342 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_book_views() method.
#
$caption = " \tWorkbook: _write_book_views()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_book_views();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_calc_pr.t 000644 000765 000024 00000001441 12241403706 022567 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_calc_pr() method.
#
$caption = " \tWorkbook: _write_calc_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_calc_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_defined_name.t 000644 000765 000024 00000001600 12241403706 023557 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_defined_name() method.
#
$caption = " \tWorkbook: _write_defined_name()";
$expected = 'Sheet1!$1:$1';
$workbook = _new_workbook(\$got);
$workbook->_write_defined_name( [ '_xlnm.Print_Titles', 0, 'Sheet1!$1:$1' ] );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_defined_names.t 000644 000765 000024 00000005060 12241403706 023746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_new_workbook _is_deep_diff _got_to_aref);
use strict;
use warnings;
use Test::More tests => 2;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_defined_names() method.
#
$caption = " \tWorkbook: _write_defined_names()";
$expected = 'Sheet1!$1:$1';
$workbook = _new_workbook(\$got);
$workbook->{_defined_names} = [ [ '_xlnm.Print_Titles', 0, 'Sheet1!$1:$1' ] ];
$workbook->_write_defined_names();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_defined_names() method.
#
$caption = " \tWorkbook: _write_defined_names()";
$expected = q(Sheet1!$A$1Sheet1!$A$1Sheet2!$A$1Sheet1!$A$1'Sheet 3'!$A$1Sheet1!$A$1Sheet2!$A$10.98"Saab 900");
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->add_worksheet();
$workbook->add_worksheet('Sheet 3');
$workbook->define_name( q('Sheet 3'!Bar), q(='Sheet 3'!$A$1) );
$workbook->define_name( q(Abc), q(=Sheet1!$A$1) );
$workbook->define_name( q(Baz), q(=0.98) );
$workbook->define_name( q(Sheet1!Bar), q(=Sheet1!$A$1) );
$workbook->define_name( q(Sheet2!Bar), q(=Sheet2!$A$1) );
$workbook->define_name( q(Sheet2!aaa), q(=Sheet2!$A$1) );
$workbook->define_name( q('Sheet 3'!car), q(="Saab 900") );
$workbook->define_name( q(_Egg), q(=Sheet1!$A$1) );
$workbook->define_name( q(_Fog), q(=Sheet1!$A$1) );
$workbook->_prepare_defined_names();
$workbook->_write_defined_names();
$expected = _got_to_aref( $expected );
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_ext.t 000644 000765 000024 00000001613 12241403706 021765 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_ext() method.
#
$caption = " \tWorkbook: _write_ext()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_ext();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_ext_lst.t 000644 000765 000024 00000001650 12241403706 022650 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_ext_lst() method.
#
$caption = " \tWorkbook: _write_ext_lst()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_ext_lst();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_file_version.t 000644 000765 000024 00000001526 12241403706 023654 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_file_version() method.
#
$caption = " \tWorkbook: _write_file_version()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_file_version();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_mx_arch_id.t 000644 000765 000024 00000001424 12241403706 023262 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_mx_arch_id() method.
#
$caption = " \tWorkbook: _write_mx_arch_id()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_mx_arch_id();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_sheet.t 000644 000765 000024 00000003024 12241403706 022273 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_sheet() method.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Sheet1', 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet() method. Hidden worksheet.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Sheet1', 1, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_sheet() method. Sheetname with XML character.
#
$caption = " \tWorkbook: _write_sheet()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_sheet( 'Bits & Bobs', 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_sheets.t 000644 000765 000024 00000001535 12241403706 022463 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_sheets() method.
#
$caption = " \tWorkbook: _write_sheets()";
$expected = '';
$workbook = _new_workbook(\$got);
my $worksheet = $workbook->add_worksheet();
$workbook->_write_sheets();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_workbook.t 000644 000765 000024 00000001622 12241403706 023022 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook() method.
#
$caption = " \tWorkbook: _write_workbook()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_workbook_pr.t 000644 000765 000024 00000001453 12241403706 023525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook_pr() method.
#
$caption = " \tWorkbook: _write_workbook_pr()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook_pr();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_workbook_view.t 000644 000765 000024 00000003424 12241403706 024056 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _write_workbook_view() method.
#
$caption = " \tWorkbook: _write_workbook_view()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method. Second tab selected.
#
$caption = " \tWorkbook: _write_workbook_view()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->{_activesheet} = 1;
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
###############################################################################
#
# Test the _write_workbook_view() method. Second tab selected. First sheet set.
#
$caption = " \tWorkbook: _write_workbook_view()";
$expected = '';
$workbook = _new_workbook(\$got);
$workbook->{_firstsheet} = 1;
$workbook->{_activesheet} = 1;
$workbook->_write_workbook_view();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/sub_write_xml_declaration.t 000644 000765 000024 00000001463 12241403706 024335 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions '_new_workbook';
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the xml_declaration() method.
#
$caption = " \tWorkbook: xml_declaration()";
$expected = qq(\n);
$workbook = _new_workbook(\$got);
$workbook->xml_declaration();
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/workbook/workbook_01.t 000644 000765 000024 00000002720 12241403706 021237 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/workbook/workbook_02.t 000644 000765 000024 00000003036 12241403706 021241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet();
$workbook->add_worksheet();
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/workbook/workbook_03.t 000644 000765 000024 00000003116 12241403706 021241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Workbook methods.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_expected_to_aref _got_to_aref _is_deep_diff _new_workbook);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $expected;
my $got;
my $caption;
my $workbook;
###############################################################################
#
# Test the _assemble_xml_file() method.
#
$caption = " \tWorkbook: _assemble_xml_file()";
$workbook = _new_workbook(\$got);
$workbook->add_worksheet('Non Default Name');
$workbook->add_worksheet('Another Name');
$workbook->_assemble_xml_file();
$expected = _expected_to_aref();
$got = _got_to_aref( $got );
_is_deep_diff( $got, $expected, $caption );
__DATA__
Excel-Writer-XLSX-0.76/t/utility/xl_cell_to_rowcol.t 000755 000765 000024 00000007662 12241403706 022476 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_cell_to_rowcol);
use Test::More tests => 12;
###############################################################################
#
# Tests setup.
#
my @got;
my @expected;
my $caption;
my $cell;
my $row;
my $col;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @expected, [ $i, $i, 0, 0, $cell . ( $i + 1 ) ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @expected, [ $i, $i, 0, 0, $cell . ( $i + 1 ) ];
$cell++;
}
###############################################################################
#
# Test the xl_cell_to_rowcol method for the range of values generated above.
#
$caption = " \tUtility: xl_cell_to_rowcol()";
for my $aref ( @expected ) {
push @got, [ xl_cell_to_rowcol( $aref->[4] ), $aref->[4] ];
}
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the xl_cell_to_rowcol method with absolute references.
#
$cell = 'A1';
@expected = ( 0, 0, 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
$cell = 'A$1';
@expected = ( 0, 0, 1, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
$cell = '$A1';
@expected = ( 0, 0, 0, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol( $cell );
is_deeply( \@got, \@expected, $caption );
$cell = '$A$1';
@expected = ( 0, 0, 1, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol( $cell );
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Test the xl_cell_to_rowcol examples in the docs.
#
($row, $col) = xl_cell_to_rowcol('A1'); # (0, 0)
@expected = ( 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('B1'); # (0, 1)
@expected = ( 0, 1 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('C2'); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('$C2' ); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('C$2' ); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
($row, $col) = xl_cell_to_rowcol('$C$2'); # (1, 2)
@expected = ( 1, 2 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( [ $row, $col ], \@expected, $caption );
###############################################################################
#
# Test error condition.
#
$cell = '';
@expected = ( 0, 0, 0, 0 );
$caption = _get_caption( $cell, @expected );
@got = xl_cell_to_rowcol($cell);
is_deeply( \@got, \@expected, $caption );
###############################################################################
#
# Generate a caption for xl_cell_to_rowcol the tests.
#
sub _get_caption {
my $cell = shift;
my @coords = @_;
my $caption = " \tUtility: xl_cell_to_rowcol()";
if ($cell) {
$caption .= ': ' . $cell . " -> ( " . join( ', ', @expected) . ")";
}
return $caption;
}
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_col_to_name.t 000644 000765 000024 00000002663 12241403706 021740 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_col_to_name);
use Test::More tests => 3;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @$expected, [ $i, $cell ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @$expected, [ $i, $cell ];
$cell++;
}
###############################################################################
#
# Test the xl_col_to_name method.
#
$caption = " \tUtility: xl_col_to_name()";
for my $aref ( @$expected ) {
push @$got, [ $aref->[0], xl_col_to_name( $aref->[0] ) ];
}
is_deeply( $got, $expected, $caption );
###############################################################################
#
# Test the xl_col_to_name method with absolute references.
#
$expected = '$A';
$got = xl_col_to_name( 0, 1 );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_col_to_name method for the Pod example.
#
$expected = 'AAA';
$got = xl_col_to_name( 702 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_date_1904.t 000755 000765 000024 00000003012 12241403706 021043 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_date_1904);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 0;
$expected = 0;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 1462;
$expected = 0;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 36526;
$expected = 35064;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_1904() method.
#
$date = 41255;
$expected = 39793;
$caption = " \tUtility: xl_date_1904( $date )";
$got = xl_date_1904( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_date_list.t 000755 000765 000024 00000006102 12241403706 021424 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_date_list);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 9;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my @date;
###############################################################################
#
# Test the xl_date_list() method.
#
@date = ();
$expected = undef;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2);
$expected = 37258;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 12);
$expected = 37258.5;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 14, 24);
$expected = 37258.6;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (2002, 1, 2, 12, 43, 12);
$expected = 37258.53;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 1, 1);
$expected = 1;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 2, 27);
$expected = 58;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 2, 28);
$expected = 59;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_date_list() method.
#
@date = (1900, 3, 1);
$expected = 61;
$caption = " \tUtility: xl_date_list( @date )";
$got = xl_date_list( @date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_dec_col.t 000755 000765 000024 00000003060 12241403706 021044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_dec_col);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = 'B1';
$expected = 'A1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = 'AA1';
$expected = 'Z1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = '$C1';
$expected = '$B1';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_col() method.
#
$cell = '$E$5';
$expected = '$D$5';
$caption = " \tUtility: xl_dec_col( $cell ) -> $expected";
$got = xl_dec_col( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_dec_row.t 000755 000765 000024 00000003061 12241403706 021077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_dec_row);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = 'A2';
$expected = 'A1';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = 'B$3';
$expected = 'B$2';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = '$C4';
$expected = '$C3';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_dec_row() method.
#
$cell = '$D$5';
$expected = '$D$4';
$caption = " \tUtility: xl_dec_row( $cell ) -> $expected";
$got = xl_dec_row( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_decode_date_EU.t 000755 000765 000024 00000005137 12241403706 022274 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_decode_date_EU);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 7;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$expected = undef;
$caption = " \tUtility: xl_decode_date_EU()";
$got = xl_decode_date_EU();
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '19/19/2000';
$expected = undef;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '2/1/2002';
$expected = 37258;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '11/7/97';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = 'Friday 11 July 1997';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_EU() method.
#
$date = '10:12 AM Friday 11 July 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_decode_date_EU( $date )";
$got = xl_decode_date_EU( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_decode_date_US.t 000755 000765 000024 00000005140 12241403706 022304 0 ustar 00John staff 000000 000000
###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_decode_date_US);
use Test::More;
eval { require Date::Calc };
if ($@) {
plan skip_all => 'Date::Calc required to run optional tests.';
}
else {
plan tests => 7;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$expected = undef;
$caption = " \tUtility: xl_decode_date_US()";
$got = xl_decode_date_US();
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '19/19/2000';
$expected = undef;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '1/2/2002';
$expected = 37258;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '7/11/97';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = 'July 11 Friday 1997';
$expected = 35622;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_decode_date_US() method.
#
$date = '10:12 AM July 11 Friday 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_decode_date_US( $date )";
$got = xl_decode_date_US( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_inc_col.t 000755 000765 000024 00000003060 12241403706 021062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_inc_col);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = 'A1';
$expected = 'B1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = 'Z1';
$expected = 'AA1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = '$B1';
$expected = '$C1';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_col() method.
#
$cell = '$D$5';
$expected = '$E$5';
$caption = " \tUtility: xl_inc_col( $cell ) -> $expected";
$got = xl_inc_col( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_inc_row.t 000755 000765 000024 00000003061 12241403706 021115 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_inc_row);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = 'A1';
$expected = 'A2';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = 'B$2';
$expected = 'B$3';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = '$C3';
$expected = '$C4';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_inc_row() method.
#
$cell = '$D$4';
$expected = '$D$5';
$caption = " \tUtility: xl_inc_row( $cell ) -> $expected";
$got = xl_inc_row( $cell );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_parse_date.t 000755 000765 000024 00000003522 12241403706 021566 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_parse_date xl_parse_date_init);
use Test::More;
eval { require Date::Manip; require Date::Calc};
if ( $@ ) {
plan skip_all =>
'Date::Manip and Date::Calc required to run optional tests.';
}
else {
plan tests => 4;
}
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $date;
xl_parse_date_init( "TZ=GMT", "DateFormat=non-US" );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '2/1/2002';
$expected = 37258;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '11/7/97';
$expected = 35622;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = 'Friday 11 July 1997';
$expected = 35622;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_date() method.
#
$date = '10:12 AM Friday 11 July 1997';
$expected = 35622.425;
$caption = " \tUtility: xl_parse_date( $date )";
$got = xl_parse_date( $date );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_parse_time.t 000755 000765 000024 00000010671 12241403706 021612 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_parse_time);
use Test::More tests => 14;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $time;
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12';
$expected = undef;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00 PM';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:18:00 pm';
$expected = .5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18:00';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18 AM';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '00:18:00 am';
$expected = .0125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '12:43:12';
$expected = .53;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method.
#
$time = '14:24:00';
$expected = .60;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '36:18:00';
$expected = 1.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '108:18:00';
$expected = 4.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_parse_time() method. Parse hours > 24. Fix for issue #11.
#
$time = '1068:18:00';
$expected = 44.5125;
$caption = " \tUtility: xl_parse_time( $time )";
$got = xl_parse_time( $time );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_range.t 000644 000765 000024 00000006260 12241403706 020552 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_range);
use Test::More tests => 9;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
my @range;
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 0, 3, 0, 1 );
$expected = 'A1:B4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 0, 9, 0, 0 );
$expected = 'A1:A10';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 6, 65, 1, 1 );
$expected = 'B7:B66';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method.
#
@range = ( 1, 8, 2, 2 );
$expected = 'C2:C9';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 1, 0, 0, 0 );
$expected = 'A$1:E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 1, 0, 0 );
$expected = 'A1:E$4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 0, 1, 0 );
$expected = '$A1:E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 0, 0, 0, 1 );
$expected = 'A1:$E4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range() method. With absolute values.
#
@range = ( 0, 3, 0, 4, 1, 1, 1, 1 );
$expected = '$A$1:$E$4';
$caption = " \tUtility: xl_range( @range ) -> $expected";
$got = xl_range( @range );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_range_formula.t 000755 000765 000024 00000004716 12241403706 022306 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_range_formula);
use Test::More tests => 6;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
my @range;
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 0, 9, 0, 0 );
$expected = '=Sheet1!$A$1:$A$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet2', 6, 65, 1, 1 );
$expected = '=Sheet2!$B$7:$B$66';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'New data', 1, 8, 2, 2 );
$expected = q(='New data'!$C$2:$C$9);
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( q('New data'), 1, 8, 2, 2 );
$expected = q(='New data'!$C$2:$C$9);
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 1, 9, 0, 0 );
$expected = '=Sheet1!$A$2:$A$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
###############################################################################
#
# Test the xl_range_formula() method.
#
@range = ( 'Sheet1', 1, 9, 1, 1 );
$expected = '=Sheet1!$B$2:$B$10';
$caption = " \tUtility: xl_range_formula( @range ) -> $expected";
$got = xl_range_formula( @range );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/utility/xl_rowcol_to_cell.t 000644 000765 000024 00000002752 12241403706 022466 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests for Excel::Writer::XLSX::Utility.
#
# reverse ('(c)'), September 2010, John McNamara, jmcnamara@cpan.org
#
use strict;
use warnings;
use Excel::Writer::XLSX::Utility qw(xl_rowcol_to_cell);
use Test::More tests => 4;
###############################################################################
#
# Tests setup.
#
my $got;
my $expected;
my $caption;
my $cell;
# Create a test case for a range of the Excel 2007 columns.
$cell = 'A';
for my $i ( 0 .. 300 ) {
push @$expected, [ $i, $i, $cell . ( $i + 1 ) ];
$cell++;
}
$cell = 'WQK';
for my $i ( 16_000 .. 16_384 ) {
push @$expected, [ $i, $i, $cell . ( $i + 1 ) ];
$cell++;
}
###############################################################################
#
# Test the xl_rowcol_to_cell method.
#
$caption = " \tUtility: xl_rowcol_to_cell()";
for my $aref ( @$expected ) {
push @$got,
[ $aref->[0], $aref->[1], xl_rowcol_to_cell( $aref->[0], $aref->[1] ) ];
}
is_deeply( $got, $expected, $caption );
###############################################################################
#
# Test the xl_rowcol_to_cell method with absolute references.
#
$expected = 'A$1';
$got = xl_rowcol_to_cell( 0, 0, 1 );
is( $got, $expected, $caption );
$expected = '$A1';
$got = xl_rowcol_to_cell( 0, 0, 0, 1 );
is( $got, $expected, $caption );
$expected = '$A$1';
$got = xl_rowcol_to_cell( 0, 0, 1, 1 );
is( $got, $expected, $caption );
__END__
Excel-Writer-XLSX-0.76/t/regression/array_formula01.t 000644 000765 000024 00000003324 12241403703 022427 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'array_formula01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $data = [ 0, 0, 0 ];
$worksheet->write_col( 'B1', $data );
$worksheet->write_col( 'C1', $data );
$worksheet->write_array_formula( 'A1:A3', '{=SUM(B1:C1*B2:C2)}', undef, 0 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/array_formula02.t 000644 000765 000024 00000003411 12241403703 022425 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'array_formula02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bold => 1);
my $data = [ 0, 0, 0 ];
$worksheet->write_col( 'B1', $data );
$worksheet->write_col( 'C1', $data );
$worksheet->write_array_formula( 'A1:A3', '{=SUM(B1:C1*B2:C2)}', $format, 0 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/autofilter00.t 000644 000765 000024 00000007064 12241403703 021746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter00.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @data;
push @data, [split] while ;
#$worksheet->autofilter('A1:D51');
$worksheet->write('A1', [[@data]]);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter01.t 000644 000765 000024 00000007146 12241403703 021750 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @data;
push @data, [split] while ;
$worksheet->autofilter('A1:D51');
$worksheet->write('A1', [[@data]]);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter02.t 000644 000765 000024 00000010045 12241403703 021741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('A1', \@headings);
$worksheet->autofilter(0, 0, 50, 3);
$worksheet->filter_column(0, 'Region eq East');
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq 'East' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter03.t 000644 000765 000024 00000010113 12241403703 021736 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('A1', \@headings);
$worksheet->autofilter(0, 0, 50, 3);
$worksheet->filter_column('A', 'x eq East or x eq South');
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ($region eq 'East' or $region eq 'South') {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter04.t 000644 000765 000024 00000010270 12241403703 021743 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write( 'A1', \@headings );
$worksheet->autofilter('A1:D51');
$worksheet->filter_column( 'A', 'x eq East' );
$worksheet->filter_column( 'C', 'x > 3000 and x < 8000' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
my $volume = $row_data->[2];
if ( $region eq 'East'
and $volume > 3000
and $volume < 8000 )
{
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter05.t 000644 000765 000024 00000010115 12241403703 021742 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write( 'A1', \@headings );
# Create a blank cell in our test data.
$data[5]->[0] = '';
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', 'x == Blanks' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq '' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter06.t 000644 000765 000024 00000010123 12241403703 021742 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
# Create a blank cell in our test data.
$data[5]->[0] = '';
$worksheet->write( 'A1', \@headings );
$worksheet->autofilter( 'A1:D51' );
$worksheet->filter_column( 'A', 'x == NonBlanks' );
# Hide the rows that don't match the filter criteria.
my $row = 1;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region ne '' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 0, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/autofilter07.t 000644 000765 000024 00000007773 12241403703 021764 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), February 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'autofilter07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Extract the data embedded at the end of this file.
my @headings = split ' ', ;
my @data;
push @data, [split] while ;
$worksheet->write('D3', \@headings);
$worksheet->autofilter('D3:G53');
$worksheet->filter_column('D', 'Region eq East');
# Hide the rows that don't match the filter criteria.
my $row = 3;
for my $row_data ( @data ) {
my $region = $row_data->[0];
if ( $region eq 'East' ) {
# Row is visible.
}
else {
# Hide row.
$worksheet->set_row( $row, undef, undef, 1 );
}
$worksheet->write( $row++, 3, $row_data );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__DATA__
Region Item Volume Month
East Apple 9000 July
East Apple 5000 July
South Orange 9000 September
North Apple 2000 November
West Apple 9000 November
South Pear 7000 October
North Pear 9000 August
West Orange 1000 December
West Grape 1000 November
South Pear 10000 April
West Grape 6000 January
South Orange 3000 May
North Apple 3000 December
South Apple 7000 February
West Grape 1000 December
East Grape 8000 February
South Grape 10000 June
West Pear 7000 December
South Apple 2000 October
East Grape 7000 December
North Grape 6000 April
East Pear 8000 February
North Apple 7000 August
North Orange 7000 July
North Apple 6000 June
South Grape 8000 September
West Apple 3000 October
South Orange 10000 November
West Grape 4000 July
North Orange 5000 August
East Orange 1000 November
East Orange 4000 October
North Grape 5000 August
East Apple 1000 December
South Apple 10000 March
East Grape 7000 October
West Grape 1000 September
East Grape 10000 October
South Orange 8000 March
North Apple 4000 July
South Orange 5000 July
West Apple 4000 June
East Apple 5000 April
North Pear 3000 August
East Grape 9000 November
North Orange 8000 October
East Apple 10000 June
South Pear 1000 December
North Grape 10000 July
East Grape 6000 February
Excel-Writer-XLSX-0.76/t/regression/button01.t 000644 000765 000024 00000002671 12241403703 021103 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'C2', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button02.t 000644 000765 000024 00000002761 12241403703 021104 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'B4',
{ x_offset => 4, y_offset => 3, caption => 'my text' } );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button03.t 000644 000765 000024 00000002740 12241403703 021102 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button( 'C2', {} );
$worksheet->insert_button( 'E5', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button04.t 000644 000765 000024 00000003021 12241403703 021074 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->insert_button( 'E5', {} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button05.t 000644 000765 000024 00000003023 12241403703 021077 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button(
'C2',
{
macro => 'my_macro',
x_scale => 2,
y_scale => 1.5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button06.t 000644 000765 000024 00000003025 12241403703 021102 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx6_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_button(
'C2',
{
macro => 'my_macro',
width => 128,
height => 30
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button07.t 000644 000765 000024 00000003237 12241403703 021110 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button07.xlsm';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->{_vba_codename} = 'ThisWorkbook';
$worksheet->{_vba_codename} = 'Sheet1';
$worksheet->insert_button(
'C2',
{
macro => 'say_hello',
caption => 'Hello',
}
);
$workbook->add_vba_project( $dir . 'xlsx_files/vbaProject02.bin' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button08.t 000644 000765 000024 00000003161 12241403703 021105 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->write_comment( 'A1', 'Foo' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button09.t 000644 000765 000024 00000003161 12241403703 021106 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Foo' );
$worksheet2->insert_button( 'C2', {} );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button10.t 000644 000765 000024 00000003402 12241403703 021074 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Some text' );
$worksheet2->insert_button( 'B2', {} );
$worksheet3->write_comment( 'C2', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button11.t 000644 000765 000024 00000003402 12241403703 021075 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->insert_button( 'C2', {} );
$worksheet2->write_comment( 'B2', 'Some text' );
$worksheet3->write_comment( 'C3', 'More text' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/button12.t 000644 000765 000024 00000003401 12241403703 021075 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'button12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write_comment( 'A1', 'Some text' );
$worksheet1->insert_button( 'C2', {} );
$worksheet3->write_comment( 'C3', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_area01.t 000644 000765 000024 00000003716 12241403703 021662 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43407616, 43433984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_area02.t 000644 000765 000024 00000003744 12241403703 021664 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1, subtype => 'stacked' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 62813312, 62814848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_area03.t 000644 000765 000024 00000003754 12241403703 021666 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1, subtype => 'percent_stacked' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 62813312, 62814848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_area04.t 000644 000765 000024 00000004014 12241403703 021655 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_area04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'area',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591168, 63592704 ];
$chart->{_axis2_ids} = [ 74921856, 73764224 ];
my $data = [ #
[ 1, 2, 3, 4, 5 ], #
[ 6, 8, 6, 4, 2 ], #
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis01.t 000644 000765 000024 00000004032 12241403703 021706 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 58955648, 68446848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis02.t 000644 000765 000024 00000004035 12241403703 021712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43704320, 43706624 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis03.t 000644 000765 000024 00000005430 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 65514112, 65556864 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_title( name => 'Title' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis04.t 000644 000765 000024 00000004112 12241403703 021710 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46891776, 46893312 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis05.t 000644 000765 000024 00000004033 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47076480, 47078016 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis06.t 000644 000765 000024 00000003617 12241403703 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_title( name => 'Title' );
# Axis formatting should be ignored.
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis07.t 000644 000765 000024 00000004107 12241403703 021717 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43321216, 47077248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( name => 'XXX' );
$chart->set_y_axis( name => 'YYY' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis08.t 000644 000765 000024 00000004034 12241403703 021717 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49042560, 61199872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_y_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis09.t 000644 000765 000024 00000003764 12241403703 021731 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49043712, 60236160 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis10.t 000644 000765 000024 00000004100 12241403703 021702 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 41012608, 55821440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( reverse => 1 );
$chart->set_y_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis11.t 000644 000765 000024 00000003774 12241403703 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705472, 54518528 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( min => 0, max => 20 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis12.t 000644 000765 000024 00000003777 12241403703 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705088, 54517760 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( min => 0, max => 16 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis13.t 000644 000765 000024 00000004126 12241403703 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54045312, 54043776 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_y_axis( min => 0, max => 16 );
$chart->set_x_axis( min => 0, max => 6 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis14.t 000644 000765 000024 00000005407 12241403703 021721 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43814272, 54517760 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_y_axis( min => 0, max => 30 );
$chart->set_x_axis( min => 39083, max => 39087 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis15.t 000644 000765 000024 00000004016 12241403703 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 54518528 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( minor_unit => 0.4, major_unit => 2 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis16.t 000644 000765 000024 00000005260 12260412503 021717 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43572608, 43812736 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis(
minor_unit => 14,
major_unit => 1,
major_unit_type => 'months'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis17.t 000644 000765 000024 00000003772 12241403703 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812736, 45705088 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( log_base => 10 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis18.t 000644 000765 000024 00000004005 12241403703 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43813504, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', invert_if_negative => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', invert_if_negative => 0 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis19.t 000644 000765 000024 00000004063 12241403703 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43813504, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( label_position => 'high' );
$chart->set_y_axis( label_position => 'low' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis20.t 000644 000765 000024 00000004067 12241403703 021717 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43572224, 43812352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( label_position => 'next_to' );
$chart->set_y_axis( label_position => 'none' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis21.t 000644 000765 000024 00000004044 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 58921344, 54519680 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( reverse => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis22.t 000644 000765 000024 00000004003 12241403703 021707 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 86799104, 86801792 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => '#,##0.00' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis23.t 000644 000765 000024 00000004062 12241403703 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46332160, 47470848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => 'dd/mm/yyyy' );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis24.t 000644 000765 000024 00000004112 12241403703 021712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47471232, 48509696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => 'dd/mm/yyyy', num_format_linked => 1 );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis25.t 000644 000765 000024 00000004102 12241403703 021712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis25.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47471232, 48509696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( num_format => '[$ТЅ-411]#,##0.00' );
$chart->set_y_axis( num_format => '0.00%' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis26.t 000644 000765 000024 00000004010 12241403703 021711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis26.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73048448, 73049984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => 45 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis27.t 000644 000765 000024 00000004011 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis27.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73048448, 73049984 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => -35 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis28.t 000644 000765 000024 00000004010 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis28.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45451904, 47401600 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => 90 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis29.t 000644 000765 000024 00000004011 12241403703 021715 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis29.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45444480, 47402368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis(
num_font => { rotation => -90 }
);
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis30.t 000644 000765 000024 00000003727 12241403703 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis30.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69200896, 69215360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis( position_axis => 'on_tick' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis31.t 000644 000765 000024 00000003726 12241403703 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis31.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 90616960, 90618496 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_y_axis( position_axis => 'on_tick' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis32.t 000644 000765 000024 00000003727 12241403703 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis32.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 96171520, 96173056 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$chart->set_x_axis( position_axis => 'between' );
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis33.t 000644 000765 000024 00000004177 12246377353 021745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis33.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68827008, 68898816 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'XXX', name_font => { rotation => -45, baseline => -1 } );
$chart->set_y_axis( name => 'YYY', name_font => { rotation => -45, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_axis34.t 000644 000765 000024 00000003773 12246743027 021742 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_axis34.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54712192, 54713728 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( interval_unit => 2 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar01.t 000644 000765 000024 00000003713 12241403703 021513 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64052224, 64055552 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar02.t 000644 000765 000024 00000004277 12241403703 021522 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 93218304, 93219840 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', 'Foo' );
$worksheet2->write( 'A1', $data );
$chart->add_series(
categories => 'Sheet2!$A$1:$A$5',
values => 'Sheet2!$B$1:$B$5',
);
$chart->add_series(
categories => 'Sheet2!$A$1:$A$5',
values => 'Sheet2!$C$1:$C$5',
);
$worksheet2->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar03.t 000644 000765 000024 00000005030 12241403703 021507 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' [ ' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 64265216, 64447616 ];
$chart2->{_axis_ids} = [ 86048128, 86058112 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart1 );
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$4',
values => '=Sheet1!$B$1:$B$4',
);
$chart2->add_series(
categories => '=Sheet1!$A$1:$A$4',
values => '=Sheet1!$C$1:$C$4',
);
$worksheet->insert_chart( 'F25', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar04.t 000644 000765 000024 00000005177 12241403703 021524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ ' [ ' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 64446848, 64448384 ];
$chart2->{_axis_ids} = [ 85389696, 85391232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
# Sheet 1
$worksheet1->write( 'A1', $data );
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart1->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet1->insert_chart( 'E9', $chart1 );
# Sheet 2
$worksheet2->write( 'A1', $data );
$chart2->add_series(
categories => '=Sheet2!$A$1:$A$5',
values => '=Sheet2!$B$1:$B$5',
);
$chart2->add_series(
categories => '=Sheet2!$A$1:$A$5',
values => '=Sheet2!$C$1:$C$5',
);
$worksheet2->insert_chart( 'E9', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar05.t 000644 000765 000024 00000003640 12241403703 021516 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64264064, 64447232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar06.t 000644 000765 000024 00000004152 12241403703 021516 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64053248, 64446464 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'Apple' );
$chart->set_y_axis( name => 'Pear' );
$chart->set_title( name => 'Title' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar07.t 000644 000765 000024 00000004172 12241403703 021521 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name_formula => '=Sheet1!$A$2', data => [2] );
$chart->set_y_axis( name_formula => '=Sheet1!$A$3', data => [3] );
$chart->set_title( name_formula => '=Sheet1!$A$1', data => [1] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar08.t 000644 000765 000024 00000003723 12241403703 021523 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40522880, 40524416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'http://www.perl.com/' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar09.t 000644 000765 000024 00000004012 12241403703 021514 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart =
$workbook->add_chart( type => 'bar', subtype => 'stacked', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40274560, 40295040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar10.t 000644 000765 000024 00000004041 12241403703 021506 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'bar',
subtype => 'percent_stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40274560, 40295040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar11.t 000644 000765 000024 00000005263 12241403703 021516 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [
' [
' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart3 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'http://www.perl.com/' );
$worksheet->write( 'A8', 'http://www.perl.org/' );
$worksheet->write( 'A9', 'http://www.perl.net/' );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart3->add_series( values => '=Sheet1!$A$1:$A$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'D25', $chart2 );
$worksheet->insert_chart( 'L32', $chart3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar12.t 000644 000765 000024 00000003560 12241403703 021515 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40293888, 40295424 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar13.t 000644 000765 000024 00000004422 12241403703 021514 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'bar' );
my $worksheet4 = $workbook->add_worksheet();
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
$chart2->{_chart}->{_axis_ids} = [ 62356096, 62366080 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar14.t 000644 000765 000024 00000005325 12241403703 021520 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart2 = $workbook->add_chart( type => 'bar', embedded => 1 );
my $chart3 = $workbook->add_chart( type => 'column' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 40294272, 40295808 ];
$chart2->{_axis_ids} = [ 40261504, 65749760 ];
$chart3->{_chart}->{_axis_ids} = [ 65465728, 66388352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet2->write( 'A1', $data );
$worksheet2->write( 'A6', 'http://www.perl.com/' );
$chart3->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet2!$B$1:$B$5' );
$chart3->add_series( values => '=Sheet2!$C$1:$C$5' );
$chart1->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet2!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet2!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$worksheet2->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'F25', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar15.t 000644 000765 000024 00000004330 12241403703 021514 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'column' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_chart}->{_axis_ids} = [ 62576896, 62582784 ];
$chart2->{_chart}->{_axis_ids} = [ 65979904, 65981440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar16.t 000644 000765 000024 00000004077 12241403703 021525 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 64784640, 65429504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( name => 'Apple' );
$chart->set_y_axis( name => 'Pear' );
$chart->set_title( name => 'Title' );
$chart->set_legend( position => 'bottom' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar17.t 000644 000765 000024 00000003663 12241403703 021526 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar18.t 000644 000765 000024 00000004416 12241403703 021524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
'xl/printerSettings/printerSettings1.bin',
'xl/chartsheets/_rels/sheet1.xml.rels',
'\[Content_Types\].xml',
];
my $ignore_elements = {
'xl/chartsheets/sheet1.xml' => [
' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 40294272, 40295808 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->activate();
$chart->set_header( 'Page &P' );
$chart->set_footer( '&A' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar19.t 000644 000765 000024 00000004152 12241403703 021522 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 66558592, 66569344 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => [ 'Sheet1', 0, 4, 0, 0 ] );
$chart->add_series( values => [ 'Sheet1', 0, 4, 1, 1 ] );
$chart->add_series( values => [ 'Sheet1', 0, 4, 2, 2 ] );
$chart->set_x_axis( name => '=Sheet1!$A$2' );
$chart->set_y_axis( name => '=Sheet1!$A$3' );
$chart->set_title( name => '=Sheet1!$A$1' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar20.t 000644 000765 000024 00000004102 12241403703 021505 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45925120, 45927040 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A7', 'Pear' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', name => 'Apple' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', name => '=Sheet1!$A$7' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar21.t 000644 000765 000024 00000004154 12241403703 021515 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar21.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 64052224, 64055552 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
categories_data => $data->[0],
values_data => $data->[1],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
categories_data => $data->[0],
values_data => $data->[2],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar22.t 000644 000765 000024 00000005203 12241403703 021512 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar22.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43706240, 43727104 ];
my $headers = [ 'Series 1', 'Series 2', 'Series 3' ];
my $data = [
[ 'Category 1', 'Category 2', 'Category 3', 'Category 4' ],
[ 4.3, 2.5, 3.5, 4.5 ],
[ 2.4, 4.5, 1.8, 2.8 ],
[ 2, 2, 3, 5 ],
];
$worksheet->set_column( 'A:D', 11 );
$worksheet->write( 'B1', $headers );
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$B$2:$B$5',
categories_data => $data->[0],
values_data => $data->[1],
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$C$2:$C$5',
categories_data => $data->[0],
values_data => $data->[2],
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$D$2:$D$5',
categories_data => $data->[0],
values_data => $data->[3],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar23.t 000644 000765 000024 00000004661 12241403703 021522 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar23.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43706240, 43727104 ];
my $headers = [ 'Series 1', 'Series 2', 'Series 3' ];
my $data = [
[ 'Category 1', 'Category 2', 'Category 3', 'Category 4' ],
[ 4.3, 2.5, 3.5, 4.5 ],
[ 2.4, 4.5, 1.8, 2.8 ],
[ 2, 2, 3, 5 ],
];
$worksheet->set_column( 'A:D', 11 );
$worksheet->write( 'B1', $headers );
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$B$2:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$C$2:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$5',
values => '=Sheet1!$D$2:$D$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_bar24.t 000644 000765 000024 00000003753 12241403703 021524 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_bar24.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591168, 63592704 ];
$chart->{_axis2_ids} = [ 65934464, 72628864 ];
my $data = [ [ 27, 33, 44, 12, 1 ], [ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank01.t 000644 000765 000024 00000003705 12241403703 022037 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45705856, 45843584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'gap' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank02.t 000644 000765 000024 00000003706 12241403703 022041 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 44253568, 44269952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'zero' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank03.t 000644 000765 000024 00000003706 12241403703 022042 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 44253568, 44269952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank04.t 000644 000765 000024 00000003722 12241403703 022041 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42268928, 42990208 ];
my $data = [
[ 1, 2, undef, 4, 5 ],
[ 2, 4, undef, 8, 10 ],
[ 3, 6, undef, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank05.t 000644 000765 000024 00000003722 12241403703 022042 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/drawings/drawing1.xml' => ['xdr:ext'] };
###############################################################################
#
# Test the worksheet properties of an Excel::Writer::XLSX chartsheet file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 57619968, 57621504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_blanks_as( 'span' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_blank06.t 000644 000765 000024 00000003700 12241403703 022037 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_blank06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42270080, 42990208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->show_hidden_data();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_chartarea01.t 000644 000765 000024 00000004201 12241403703 022672 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82933248, 82952960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_chartarea(
border => { none => 1 },
fill => { color => 'red' }
);
$chart->set_plotarea(
border => { color => 'yellow', width => 1, dash_type => 'dash' },
fill => { color => '#92D050' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_chartarea02.t 000644 000765 000024 00000004275 12241403703 022706 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82933248, 82952960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the deprected Spreadsheet::WriteExcel interface.
$chart->set_chartarea(
line_pattern => 'none',
color => 'red'
);
$chart->set_plotarea(
line_pattern => 'dash',
line_weight => 'narrow',
line_color => 'yellow',
color => '#92D050'
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_chartarea03.t 000644 000765 000024 00000004256 12241403703 022706 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46210048, 46208512 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_chartarea(
border => { dash_type => 'round_dot' },
fill => { color => '#9999FF' }
);
$chart->set_plotarea(
border => { dash_type => 'square_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_chartarea04.t 000644 000765 000024 00000005440 12241403703 022703 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82954112, 82956288 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_chartarea(
border => { color => '#FF0000' },
fill => { color => '#00B050' }
);
$chart->set_plotarea(
border => { dash_type => 'dash_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_chartarea05.t 000644 000765 000024 00000003736 12241403703 022712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_chartarea05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_chartarea(
border => { color => '#FFFF00', dash_type => 'long_dash' },
fill => { color => '#92D050' }
);
# This should be ignored for a pie chart.
$chart->set_plotarea(
border => { dash_type => 'dash_dot' },
fill => { color => '#FFC000' }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column01.t 000644 000765 000024 00000003646 12241403703 022251 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43424000, 43434368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column02.t 000644 000765 000024 00000004036 12241403703 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
subtype => 'stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49388544, 69387008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column03.t 000644 000765 000024 00000004045 12241403703 022245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
# Ignore the page margins.
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
subtype => 'percent_stacked',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49388544, 69387008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column04.t 000644 000765 000024 00000003772 12241403703 022254 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'column',
embedded => 1
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63591936, 63593856 ];
$chart->{_axis2_ids} = [ 63613568, 63612032 ];
my $data = [ [ 1, 2, 3, 4, 5 ], [ 6, 8, 6, 4, 2 ], ];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5', y2_axis => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column05.t 000644 000765 000024 00000003644 12241403703 022253 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet( 'Foo' );
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47292800, 47295104 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Foo!$A$1:$A$5' );
$chart->add_series( values => '=Foo!$B$1:$B$5' );
$chart->add_series( values => '=Foo!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column06.t 000644 000765 000024 00000004004 12241403703 022243 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47363584, 49673344 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet2->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column07.t 000644 000765 000024 00000003572 12260125676 022270 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68810240, 68811776 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=(Sheet1!$A$1:$A$2,Sheet1!$A$4:$A$5)',
values_data => [1, 2, 4, 5],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_column08.t 000644 000765 000024 00000003753 12260130231 022251 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_column08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68809856, 68811392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=(Sheet1!$A$1:$A$2,Sheet1!$A$4:$A$5)',
values => '=(Sheet1!$B$1:$B$2,Sheet1!$B$4:$B$5)',
categories_data => [ 1, 2, 4, 5 ],
values_data => [ 2, 4, 8, 10 ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_crossing01.t 000644 000765 000024 00000004136 12241403703 022576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812352, 43814272 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( crossing => 'max');
# Not stictly required. Just to match reference file.
$chart->set_x_axis( position => 't' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_crossing02.t 000644 000765 000024 00000004042 12241403703 022573 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43812352, 43814272 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( crossing => 3 );
$chart->set_y_axis( crossing => 8 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_crossing03.t 000644 000765 000024 00000004177 12241403703 022605 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54519680, 54518144 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( crossing => 'max', position => 'top' );
$chart->set_y_axis( crossing => 'max', position => 'right' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_crossing04.t 000644 000765 000024 00000004117 12241403703 022600 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_crossing04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54519296, 54517760 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( crossing => 3 );
$chart->set_y_axis( crossing => 8 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_date01.t 000644 000765 000024 00000004663 12260411106 021666 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73655040, 73907584 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
date_axis => 1
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_date02.t 000644 000765 000024 00000005102 12260415225 021662 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 55112064, 55115136 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
min => $worksheet->convert_date_time('2013-01-02T'),
max => $worksheet->convert_date_time('2013-01-09T'),
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_date03.t 000644 000765 000024 00000004754 12260412222 021671 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51761152, 51762688 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
minor_unit => 1,
major_unit => 1,
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_date04.t 000644 000765 000024 00000005061 12260414406 021670 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_date04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
# Ignore the default format code for now.
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51761152, 51762688 ];
$worksheet->set_column('A:A', 12);
my @dates = (
'2013-01-01T', '2013-01-02T', '2013-01-03T', '2013-01-04T',
'2013-01-05T', '2013-01-06T', '2013-01-07T', '2013-01-08T',
'2013-01-09T', '2013-01-10T'
);
my @data = ( 10, 30, 20, 40, 20, 60, 50, 40, 30, 30 );
for my $row ( 0 .. @dates -1 ) {
$worksheet->write_date_time( $row, 0, $dates[$row], $date_format );
$worksheet->write( $row, 1, $data[$row] );
}
$chart->add_series(
categories => '=Sheet1!$A$1:$A$10',
values => '=Sheet1!$B$1:$B$10',
);
$chart->set_x_axis(
date_axis => 1,
minor_unit => 1,
minor_unit_type => 'months',
major_unit => 1,
major_unit_type => 'years',
num_format => 'dd/mm/yyyy',
num_format_linked => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_drop_lines01.t 000644 000765 000024 00000004000 12241403703 023073 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48034944, 48036864 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_drop_lines02.t 000644 000765 000024 00000004067 12241403703 023111 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 70938624, 70940160 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines( line => { color => 'red', dash_type => 'square_dot' } );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_drop_lines03.t 000644 000765 000024 00000004000 12241403703 023075 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with drop down lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61151872, 63947136 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 1, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_drop_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_drop_lines04.t 000644 000765 000024 00000005172 12241403703 023111 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_drop_lines04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49019520, 49222016 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_drop_lines();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars01.t 000644 000765 000024 00000004026 12241403703 022746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63386752, 63388288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars02.t 000644 000765 000024 00000004344 12241403703 022752 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63385984, 63387904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'fixed',
value => 2,
end_style => 0,
direction => 'minus'
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
y_error_bars => {
type => 'percentage',
value => 5,
direction => 'plus'
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars03.t 000644 000765 000024 00000004137 12241403703 022753 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 52288896, 53605504 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'standard_error',
line => { color => 'red', dash_type => 'round_dot' }
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars04.t 000644 000765 000024 00000004130 12241403703 022745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61626624, 69664128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
x_error_bars => { type => 'standard_deviation', value => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars05.t 000644 000765 000024 00000004025 12241403703 022751 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49016832, 49019136 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
x_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars06.t 000644 000765 000024 00000004030 12241403703 022746 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45472384, 49016832 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars07.t 000644 000765 000024 00000005374 12241403703 022763 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470848, 45472768 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
y_error_bars => { type => 'standard_error' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
y_error_bars => { type => 'standard_error' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars08.t 000644 000765 000024 00000004134 12241403703 022755 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198976, 69200896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => [1],
minus_values => [2]
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars09.t 000644 000765 000024 00000004154 12241403703 022760 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 71917952, 71919488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => [ 1, 2, 3 ],
minus_values => [ 2, 4, 6 ]
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_errorbars10.t 000644 000765 000024 00000004272 12241403703 022751 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_errorbars10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with error bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198976, 69200896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
y_error_bars => {
type => 'custom',
plus_values => '=Sheet1!$A$1',
minus_values => '=Sheet1!$B$1:$B$3',
plus_data => [1],
minus_data => [ 2, 4, 6 ],
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font01.t 000644 000765 000024 00000004302 12241403703 021710 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43945344, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
num_font => { size => 11, bold => 1, italic => 1 }
);
$chart->set_y_axis(
name => 'YYY',
num_font => { size => 9, bold => 0, italic => 1 }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font02.t 000644 000765 000024 00000004442 12241403703 021716 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43945344, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
name_font => { bold => 0, italic => 1 },
num_font => { size => 11, bold => 1, italic => 1 },
);
$chart->set_y_axis(
name => 'YYY',
name_font => { bold => 1, italic => 1 },
num_font => { size => 9, bold => 0, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font03.t 000644 000765 000024 00000004524 12241403703 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45704704, 45716224 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
name_font => { bold => 0, italic => 1 },
);
$chart->set_x_axis(
name => 'XXX',
name_font => { bold => 0, italic => 1 },
num_font => { size => 11, bold => 1, italic => 1 },
);
$chart->set_y_axis(
name => 'YYY',
name_font => { bold => 1, italic => 1 },
num_font => { size => 9, bold => 0, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font04.t 000644 000765 000024 00000004401 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43944960, 45705472 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => '=Sheet1!$A$1',
name_font => { bold => 0, italic => 1 },
);
$chart->set_x_axis(
name => '=Sheet1!$A$2',
name_font => { bold => 0, italic => 1 },
);
$chart->set_y_axis(
name => '=Sheet1!$A$3',
name_font => { bold => 1, italic => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font05.t 000644 000765 000024 00000004327 12241403703 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49407488, 53740288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title' );
$chart->set_x_axis(
name => 'XXX',
num_font => { name => 'Arial', pitch_family => 34, charset => 0 }
);
$chart->set_y_axis(
name => 'YYY',
num_font => { bold => 1, italic => 1, underline => 1, }
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font06.t 000644 000765 000024 00000005470 12241403703 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49407488, 53740288 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
name_font => {
name => 'Calibri',
pitch_family => 34,
charset => 0,
color => 'yellow',
},
);
$chart->set_x_axis(
name => 'XXX',
name_font => {
name => 'Courier New',
pitch_family => 49,
charset => 0,
color => '#92D050'
},
num_font => {
name => 'Arial',
pitch_family => 34,
charset => 0,
color => '#00B0F0',
},
);
$chart->set_y_axis(
name => 'YYY',
name_font => {
name => 'Century',
pitch_family => 18,
charset => 0,
color => 'red'
},
num_font => {
bold => 1,
italic => 1,
underline => 1,
color => '#7030A0',
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font07.t 000644 000765 000024 00000003741 12241403703 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69215744, 69217280 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( font => { size => 9, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font08.t 000644 000765 000024 00000003756 12241403703 021733 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69199744, 69214976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( font => { bold => 1, italic => 1, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_font09.t 000644 000765 000024 00000004051 12246716177 021742 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_font09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68825472, 68827392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title( name => 'Title', name_font => { rotation => -45, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format01.t 000644 000765 000024 00000003736 12241403703 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46335872, 46365696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format02.t 000644 000765 000024 00000004005 12241403703 022233 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46335872, 46365696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
line => { color => 'red' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format03.t 000644 000765 000024 00000004060 12241403703 022235 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46175744, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
border => { color => 'yellow' },
fill => { color => 'red' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format04.t 000644 000765 000024 00000004013 12241403703 022234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46175744, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
fill => { color => '#FF0000' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format05.t 000644 000765 000024 00000004012 12241403703 022234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46319488, 46335872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format06.t 000644 000765 000024 00000004101 12241403703 022234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46163840, 46175360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'diamond', size => 7 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format07.t 000644 000765 000024 00000004240 12241403703 022241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46163840, 46175360 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => {
type => 'square',
size => 5,
line => { color => 'yellow' },
fill => { color => 'red' },
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format08.t 000644 000765 000024 00000004065 12241403703 022247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46164608, 46176128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => { type => 'linear' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format09.t 000644 000765 000024 00000004202 12241403703 022241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46115072, 46157184 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
line => {
color => 'red',
width => 1.25,
dash_type => 'square_dot',
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format10.t 000644 000765 000024 00000004301 12241403703 022231 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54795648, 56296960 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'linear',
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
},
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format11.t 000644 000765 000024 00000004471 12241403703 022242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 50664576, 50666496 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'polynomial',
name => 'My trend name',
order => 2,
forward => 0.5,
backward => 0.5,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format12.t 000644 000765 000024 00000004342 12241403703 022240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54794880, 56296576 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => {
type => 'moving_average',
period => 2,
line => {
color => 'red',
width => 1,
dash_type => 'long_dash',
},
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format13.t 000644 000765 000024 00000004057 12241403703 022244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51785088, 51804032 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format14.t 000644 000765 000024 00000004120 12241403703 022234 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 51819264, 52499584 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, series_name => 1 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format15.t 000644 000765 000024 00000004143 12241403703 022242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42401792, 42403712 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
trendline => { type => 'linear' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_legend( delete_series => [2, 0] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format16.t 000644 000765 000024 00000004146 12241403703 022246 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43943040, 44287488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
data_labels => { value => 1, category => 1, series_name => 1, position => 'center' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format17.t 000644 000765 000024 00000003715 12241403703 022250 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42379520, 47284608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', fill => { none => 1 } );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_format18.t 000644 000765 000024 00000003764 12241403703 022255 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_format18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with chart formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 42379520, 47284608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
border => { none => 1 },
fill => { none => 1 }
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gap01.t 000644 000765 000024 00000004013 12241403703 021510 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45438848, 45470464 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => 5,
gap => 157,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gap02.t 000644 000765 000024 00000004015 12241403703 021513 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470464, 45472000 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => -100,
gap => 0,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gap03.t 000644 000765 000024 00000004016 12241403703 021515 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gap03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with bar gap/overlap.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45470464, 45472000 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
overlap => 100,
gap => 500,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines01.t 000644 000765 000024 00000004015 12241403703 022723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 67390848, 68472192 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines02.t 000644 000765 000024 00000004072 12241403703 022727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 57940608, 57938688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines03.t 000644 000765 000024 00000005302 12241403703 022725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54553600, 54977280 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis( major_gridlines => { visible => 1 } );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines04.t 000644 000765 000024 00000004002 12241403703 022722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54977280, 54978816 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis( major_gridlines => { visible => 0 } );
$chart->{_y_axis}->{_major_tick_mark} = 'cross';
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines05.t 000644 000765 000024 00000004152 12241403703 022731 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 80072064, 79959168 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines06.t 000644 000765 000024 00000004227 12241403703 022735 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 82812288, 46261376 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines07.t 000644 000765 000024 00000005436 12241403703 022741 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 59313152, 59364096 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_x_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines08.t 000644 000765 000024 00000004061 12241403703 022733 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 60019072, 60020608 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_y_axis(
major_gridlines => { visible => 1 },
minor_gridlines => { visible => 1 },
);
$chart->{_y_axis}->{_major_tick_mark} = 'cross';
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_gridlines09.t 000644 000765 000024 00000004574 12241403703 022745 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_gridlines09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX gridlines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48744320, 49566848 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_x_axis(
major_gridlines => {
visible => 1,
line => { color => 'red', width => 0.5, dash_type => 'square_dot' }
},
minor_gridlines => {
visible => 1,
line => { color => 'yellow' }
},
);
$chart->set_y_axis(
major_gridlines => {
visible => 1,
line => { width => 1.25, dash_type => 'dash' }
},
minor_gridlines => {
visible => 1,
line => { color => '#00B050' }
},
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_high_low_lines01.t 000644 000765 000024 00000004007 12241403703 023736 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_high_low_lines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with high-low lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49018368, 49019904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_high_low_lines();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_high_low_lines02.t 000644 000765 000024 00000004132 12241403703 023736 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_high_low_lines02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with high-low lines.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61180928, 63898368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_high_low_lines(
line => {
color => 'red',
dash_type => 'square_dot'
}
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout01.t 000644 000765 000024 00000004205 12241403703 022261 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69198592, 69200128 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_plotarea(
layout => {
x => 0.13171062992125984,
y => 0.26436351706036748,
width => 0.73970734908136482,
height => 0.5713732137649461,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout02.t 000644 000765 000024 00000004204 12241403703 022261 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68311296, 69198208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend(
layout => {
x => 0.80197353455818021,
y => 0.37442403032954213,
width => 0.12858202099737534,
height => 0.25115157480314959,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout03.t 000644 000765 000024 00000004244 12241403703 022266 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68312064, 69198592 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend(
position => 'overlay_right',
layout => {
x => 0.80197353455818043,
y => 0.3744240303295423,
width => 0.12858202099737534,
height => 0.25115157480314959,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout04.t 000644 000765 000024 00000004113 12241403703 022262 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 68311296, 69198208 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
layout => {
x => 0.42631933508311465,
y => 0.14351851851851852,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout05.t 000644 000765 000024 00000004463 12241405744 022302 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'area', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43495808, 43497728 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 8, 7, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis(
name => 'XXX',
name_layout => {
x => 0.34620319335083105,
y => 0.85090259550889469,
}
);
$chart->set_y_axis(
name => 'YYY',
name_layout => {
x => 0.21388888888888888,
y => 0.26349919801691457,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout06.t 000644 000765 000024 00000004125 12241403703 022267 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43496576, 45486080 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name => 'Title',
overlay => 1,
layout => {
x => 0.42354155730533688,
y => 0.16203703703703703,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout07.t 000644 000765 000024 00000004142 12241403703 022267 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45861120, 45867008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name_formula => '=Sheet1!$A$1', data => [1],
layout => {
x => 0.359652668416448,
y => 0.1388888888888889,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_layout08.t 000644 000765 000024 00000004154 12241403703 022273 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_layout08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with user defined layout.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46317568, 46319488 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_title(
name_formula => '=Sheet1!$A$1', data => [1],
overlay => 1,
layout => {
x => 0.359652668416448,
y => 0.16203703703703703,
}
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_legend01.t 000644 000765 000024 00000003737 12241532157 022221 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_legend01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with legend options.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54461952, 54463872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( position => 'none' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_legend02.t 000644 000765 000024 00000003727 12241532226 022216 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_legend01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with legend options.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54461952, 54463872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_legend( none => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_line01.t 000644 000765 000024 00000003642 12241403703 021677 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 43408000, 43434368 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_line02.t 000644 000765 000024 00000003777 12241403703 021711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63593856, 63612032 ];
$chart->{_axis2_ids} = [ 63615360, 63613568 ];
my $data = [ #
[ 1, 2, 3, 4, 5 ],
[ 6, 8, 6, 4, 2 ]
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series(
values => '=Sheet1!$B$1:$B$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_line03.t 000644 000765 000024 00000003660 12241403703 021701 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47673728, 47675264 ];
my $data = [
[ 5, 2, 3, 4, 3 ],
[ 10, 4, 6, 8, 6 ],
[ 15, 6, 9, 12, 9 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', smooth => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_line04.t 000644 000765 000024 00000003675 12241403703 021710 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_line04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47670016, 47671552 ];
my $data = [
[ 5, 2, 3, 4, 3 ],
[ 10, 4, 6, 8, 6 ],
[ 15, 6, 9, 12, 9 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', smooth => 1 );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5', smooth => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_name01.t 000644 000765 000024 00000003714 12241403703 021670 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New Chart Name'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47335296, 56029952 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_name02.t 000644 000765 000024 00000004463 12241403703 021673 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 1'
);
my $chart2 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 2'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 44271104, 45703168 ];
$chart2->{_axis_ids} = [ 80928128, 80934400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'E24', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_name03.t 000644 000765 000024 00000004463 12241403703 021674 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_name03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 1'
);
my $chart2 = $workbook->add_chart(
type => 'line',
embedded => 1,
name => 'New 2'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 44271104, 45703168 ];
$chart2->{_axis_ids} = [ 80928128, 80934400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart1->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart1->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart2->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart2->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart1 );
$worksheet->insert_chart( 'E24', $chart2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_order01.t 000644 000765 000024 00000005235 12241403703 022063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
my $chart2 = $workbook->add_chart(
type => 'bar',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 54976896, 54978432 ];
$chart2->{_axis_ids} = [ 54310784, 54312320 ];
$chart3->{_axis_ids} = [ 69816704, 69818240 ];
$chart4->{_axis_ids} = [ 69816704, 69818240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'E9', $chart2 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_order02.t 000644 000765 000024 00000005237 12241403703 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart2 = $workbook->add_chart(
type => 'bar',
embedded => 1,
);
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 54976896, 54978432 ];
$chart2->{_axis_ids} = [ 54310784, 54312320 ];
$chart3->{_axis_ids} = [ 69816704, 69818240 ];
$chart4->{_axis_ids} = [ 69816704, 69818240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet2->insert_chart( 'E9', $chart2 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_order03.t 000644 000765 000024 00000005425 12241403703 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_order03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' [ ' [ 'new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $chart2 = $workbook->add_chart( type => 'bar' );
my $worksheet3 = $workbook->add_worksheet();
my $chart4 = $workbook->add_chart(
type => 'pie',
embedded => 1,
);
my $chart3 = $workbook->add_chart(
type => 'line',
embedded => 1,
);
my $chart1 = $workbook->add_chart(
type => 'column',
embedded => 1,
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart1->{_axis_ids} = [ 67913600, 68169088 ];
$chart2->{_chart}->{_axis_ids} = [ 58117120, 67654400 ];
$chart3->{_axis_ids} = [ 58109952, 68215936 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$worksheet2->write( 'A1', $data );
$worksheet3->write( 'A1', $data );
$chart1->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart2->add_series( values => '=Sheet2!$A$1:$A$5' );
$chart3->add_series( values => '=Sheet3!$A$1:$A$5' );
$chart4->add_series( values => '=Sheet1!$B$1:$B$5' );
$worksheet1->insert_chart( 'E9', $chart1 );
$worksheet3->insert_chart( 'E9', $chart3 );
$worksheet1->insert_chart( 'E24', $chart4 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_pie01.t 000644 000765 000024 00000003310 12241403703 021515 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_pie02.t 000644 000765 000024 00000003423 12246734003 021530 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( font => { bold => 1, italic => 1, baseline => -1 } );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_pie03.t 000644 000765 000024 00000003365 12246735430 021543 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( delete_series => [1] );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_pie04.t 000644 000765 000024 00000003374 12246735743 021553 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_pie04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [
[ 2, 4, 6 ],
[ 60, 30, 10 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$3',
values => '=Sheet1!$B$1:$B$3',
);
$chart->set_legend( position => 'overlay_right' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points01.t 000644 000765 000024 00000003317 12241403703 022263 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [ [ 2, 5, 4, 1, 7, 4 ] ];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$6',
points => [ { fill => { color => 'red' } } ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points02.t 000644 000765 000024 00000003461 12241403703 022264 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
my $data = [ [ 2, 5, 4, 1, 7, 4 ] ];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$6',
points => [
undef, { border => { color => 'red', dash_type => 'square_dot' } },
undef, { fill => { color => 'yellow' } }
],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points03.t 000644 000765 000024 00000003705 12241403703 022266 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'pie', embedded => 1 );
# Replicate the cutom colors for testing.
$workbook->set_custom_color( 40, 0xCC, 0x00, 0x00 );
$workbook->set_custom_color( 41, 0x99, 0x00, 0x00 );
my $data = [ 2, 5, 4, ];
$worksheet->write_col( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$3',
points => [
{ fill => { color => '#FF0000' } },
{ fill => { color => '#CC0000' } },
{ fill => { color => '#990000' } },
],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points04.t 000644 000765 000024 00000004226 12241403703 022266 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48542464, 46807296 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
points => [
{ fill => { color => 'red' } },
{ fill => { color => 'yellow' } }
],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
points => [ undef, undef, { fill => { color => 'yellow' } } ],
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points05.t 000644 000765 000024 00000004156 12241403703 022271 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45471616, 46804992 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
points => [ { fill => { color => 'red' } } ],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'automatic' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_points06.t 000644 000765 000024 00000004160 12241403703 022265 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_points06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with point formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 71050368, 71051904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
points => [ { fill => { color => 'red' } } ],
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'automatic' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_radar01.t 000644 000765 000024 00000003644 12241403703 022043 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'radar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56801152, 56802688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_radar02.t 000644 000765 000024 00000003714 12241403703 022042 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'radar',
embedded => 1,
subtype => 'with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 48543616, 48545152 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_radar03.t 000644 000765 000024 00000003706 12241403703 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_radar03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'radar',
embedded => 1,
subtype => 'filled'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 56802304, 56845440 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter01.t 000644 000765 000024 00000003723 12241403703 022415 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40262272, 40260352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter02.t 000644 000765 000024 00000004011 12241403703 022405 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54514816, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter03.t 000644 000765 000024 00000003774 12241403703 022425 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54010624, 45705856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter04.t 000644 000765 000024 00000004007 12241403703 022414 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54011008, 45706240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter05.t 000644 000765 000024 00000003772 12241403703 022425 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 54011776, 54010240 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter06.t 000644 000765 000024 00000004105 12241403703 022415 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 57708544, 44297600 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->set_x_axis( minor_unit => 1, major_unit => 3 );
$chart->set_y_axis( minor_unit => 2, major_unit => 4 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter07.t 000644 000765 000024 00000004236 12241403703 022423 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [' [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63597952, 63616128 ];
$chart->{_axis2_ids} = [ 63617664, 63619456 ];
my $data = [
[ 27, 33, 44, 12, 1 ],
[ 6, 8, 6, 4, 2 ],
[ 20, 10, 30, 50, 40 ],
[ 0, 27, 23, 30, 40 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$C$1:$C$5',
values => '=Sheet1!$D$1:$D$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter08.t 000644 000765 000024 00000003725 12241403703 022426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 103263232, 103261696 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A2', $data );
$chart->add_series(
categories => '=Sheet1!$A$2:$A$6',
values => '=Sheet1!$B$2:$B$6',
);
$chart->add_series(
categories => '=Sheet1!$A$2:$A$6',
values => '=Sheet1!$C$2:$C$6',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter09.t 000644 000765 000024 00000004034 12241403703 022421 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45953024, 45954944 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
smooth => 0,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter10.t 000644 000765 000024 00000004017 12241403703 022412 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'smooth'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 84754816, 84756352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
smooth => 0,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter11.t 000644 000765 000024 00000004036 12241403703 022414 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart(
type => 'scatter',
embedded => 1,
subtype => 'straight_with_markers'
);
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 47439232, 47670400 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
smooth => 1,
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter12.t 000644 000765 000024 00000004141 12241403703 022412 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69472640, 69216896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'automatic' },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter13.t 000644 000765 000024 00000004153 12241403703 022416 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight_with_markers',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69472640, 69216896 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'none' },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_scatter14.t 000644 000765 000024 00000004231 12241403703 022414 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_scatter14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter',
subtype => 'straight',
embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 69216512, 69214976 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
marker => { type => 'star', size => 5 },
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
marker => { type => 'plus', size => 5 },
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_size01.t 000644 000765 000024 00000003716 12241403703 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_size( width => 512, height => 320 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_size02.t 000644 000765 000024 00000003741 12241403703 021723 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx2_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$chart->set_size( x_scale => 1.066666666, y_scale => 1.11111111 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_size03.t 000644 000765 000024 00000003674 12241403703 021731 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_size01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx3_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chartarea properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355904, 61365248 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart, 0, 0, 1.066666666, 1.11111111 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_sparse01.t 000644 000765 000024 00000004030 12241403703 022235 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_sparse01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46202880, 46204416 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, undef, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$6',
values => '=Sheet1!$C$1:$C$6',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_stock01.t 000644 000765 000024 00000005103 12260406550 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_stock01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40522880, 40524416 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_stock02.t 000644 000765 000024 00000005506 12241403703 022075 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_stock02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ ' [ '
[ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 63596416, 63597952 ];
$chart->{_axis2_ids} = [ 51206784, 51204480 ];
my $data = [
[
'2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T',
'2007-01-05T'
],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
y2_axis => 1,
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_str01.t 000644 000765 000024 00000003766 12241403703 021567 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_str01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file when the chart data
# contains strings.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 40501632, 40514688 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 'Foo', 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$worksheet->write( 'A6', 'Foo' );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_str02.t 000644 000765 000024 00000004002 12241403703 021550 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_str02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file when the chart data
# contains strings.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'scatter', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 41671680, 41669376 ];
my $data = [
[ 1, 2, 'Foo', 4, 5 ],
[ 2, 4, 'Bar', 8, 10 ],
[ 3, 6, 'Baz', 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_table01.t 000644 000765 000024 00000003725 12241403703 022041 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), Decemeber 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_table01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chart axis table properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61355520, 61357056 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the default table.
$chart->set_table();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_table02.t 000644 000765 000024 00000004051 12241403703 022033 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), Decemeber 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_table02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test Excel::Writer::XLSX chart axis table properties.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 61354368, 61355904 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Test the default table.
$chart->set_table(
vertical => 0,
horizontal => 0,
outline => 0,
show_keys => 1
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_title01.t 000644 000765 000024 00000003570 12241526236 022100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_title01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with default title.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46165376, 54462720 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5', name => 'Foo' );
$chart->set_title( none => 1 );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_title02.t 000644 000765 000024 00000003557 12257425231 022106 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_title02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with default title.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'column', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 73655040, 73656576 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5');
$chart->set_title( name => 'Title!' );
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_up_down_bars01.t 000644 000765 000024 00000004001 12241403703 023420 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with up-down bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46808448, 49289856 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_up_down_bars();
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_up_down_bars02.t 000644 000765 000024 00000004406 12241403703 023432 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of an Excel::Writer::XLSX file with up-down bars.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'line', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 49019136, 49222016 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 5, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->set_up_down_bars(
up => {
fill => { color => 'red' },
line => { color => 'yellow' }
},
down => {
fill => { color => '#00B050' },
border => {
color => '#00B0F0',
dash_type => 'square_dot'
}
},
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chart_up_down_bars03.t 000644 000765 000024 00000005173 12241403703 023435 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chart_up_down_bars03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {
'xl/charts/chart1.xml' => [ 'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'stock', embedded => 1 );
my $date_format = $workbook->add_format( num_format => 14 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 45472768, 49017216 ];
my $data = [
[ '2007-01-01T', '2007-01-02T', '2007-01-03T', '2007-01-04T', '2007-01-05T' ],
[ 27.2, 25.03, 19.05, 20.34, 18.5 ],
[ 23.49, 19.55, 15.12, 17.84, 16.34 ],
[ 25.45, 23.05, 17.32, 20.45, 17.34 ],
];
for my $row ( 0 .. 4 ) {
$worksheet->write_date_time( $row, 0, $data->[0]->[$row], $date_format );
$worksheet->write( $row, 1, $data->[1]->[$row] );
$worksheet->write( $row, 2, $data->[2]->[$row] );
$worksheet->write( $row, 3, $data->[3]->[$row] );
}
$worksheet->set_column( 'A:D', 11 );
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$B$1:$B$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$C$1:$C$5',
);
$chart->add_series(
categories => '=Sheet1!$A$1:$A$5',
values => '=Sheet1!$D$1:$D$5',
);
$chart->set_up_down_bars();
$worksheet->insert_chart( 'E9', $chart );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet01.t 000644 000765 000024 00000003722 12242263043 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 79858304, 79860096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet02.t 000644 000765 000024 00000004032 12241403703 021714 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
my $worksheet2 = $workbook->add_worksheet();
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 79858304, 79860096 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet1->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$worksheet2->select();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet03.t 000644 000765 000024 00000003716 12241403703 021725 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43794816, 43796352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->hide();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet04.t 000644 000765 000024 00000003721 12241403703 021722 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43913216, 43914752 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->protect();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet05.t 000644 000765 000024 00000003726 12241403703 021730 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43695104, 43787008 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_zoom( 75 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet06.t 000644 000765 000024 00000003736 12241403703 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43778432, 43780352 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_tab_color( 'red' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet07.t 000644 000765 000024 00000004455 12241403703 021732 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/chartsheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' [' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 43911040, 46363392 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_paper( 9 );
$chart->set_portrait();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet08.t 000644 000765 000024 00000005153 12241403703 021727 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/chartsheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' [' [
'new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 46320256, 46335872 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->set_margin_left ( '0.70866141732283472' );
$chart->set_margin_right ( '0.70866141732283472' );
$chart->set_margin_top ( '0.74803149606299213' );
$chart->set_margin_bottom( '0.74803149606299213' );
$chart->set_header( 'Page &P', '0.51181102362204722' );
$chart->set_footer( '&A' , '0.51181102362204722' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/chartsheet09.t 000644 000765 000024 00000004077 12241403703 021734 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'chartsheet09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar' );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_chart}->{_axis_ids} = [ 49044480, 49055232 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series(
values => '=Sheet1!$A$1:$A$5',
border => { color => 'yellow' },
fill => { color => 'red' },
);
$chart->add_series( values => '=Sheet1!$B$1:$B$5' );
$chart->add_series( values => '=Sheet1!$C$1:$C$5' );
# Chartsheet test.
$chart->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment01.t 000644 000765 000024 00000003120 12241403703 021220 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment02.t 000644 000765 000024 00000003202 12241403703 021222 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text' );
$worksheet->write_comment( 'D17', 'More text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment03.t 000644 000765 000024 00000003271 12241403703 021231 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'XFD1048576', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment04.t 000644 000765 000024 00000003530 12241403703 021230 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet1->write( 'A1', 'Foo' );
$worksheet1->write_comment( 'B2', 'Some text' );
$worksheet3->write( 'A1', 'Bar' );
$worksheet3->write_comment( 'C7', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment05.t 000644 000765 000024 00000003642 12241403703 021235 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => [' 1024.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
for my $row ( 0 .. 127 ) {
for my $col ( 0 .. 15 ) {
$worksheet1->write_comment( $row, $col, 'Some text' );
}
}
$worksheet3->write_comment( 'A1', 'More text' );
# Set the author to match the target XLSX file.
$worksheet1->set_comments_author( 'John' );
$worksheet3->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment06.t 000644 000765 000024 00000003452 12241403703 021235 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text', visible => 1 );
$worksheet->write_comment( 'A4', 'Some text' );
$worksheet->write_comment( 'A5', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment07.t 000644 000765 000024 00000003472 12241403703 021240 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text' );
$worksheet->write_comment( 'A4', 'Some text' );
$worksheet->write_comment( 'A5', 'Some text' );
$worksheet->show_comments();
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment08.t 000644 000765 000024 00000003526 12241403703 021241 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text' );
$worksheet->write_comment( 'A2', 'Some text' );
$worksheet->write_comment( 'A3', 'Some text', visible => 0 );
$worksheet->write_comment( 'A4', 'Some text', visible => 1 );
$worksheet->write_comment( 'A5', 'Some text' );
$worksheet->show_comments();
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment09.t 000644 000765 000024 00000003333 12241403703 021236 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_comment( 'A1', 'Some text', author => 'John' );
$worksheet->write_comment( 'A2', 'Some text', author => 'Perl' );
$worksheet->write_comment( 'A3', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment10.t 000644 000765 000024 00000003206 12241403703 021225 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'B2', 'Some text', color => 51 );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment11.t 000644 000765 000024 00000003201 12241403703 021221 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet2->write( 'A1', 'Foo' );
$worksheet2->write_comment( 'B2', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet2->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/comment12.t 000644 000765 000024 00000003220 12241403703 021223 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'comment12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with comments.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(0, 21);
$worksheet->set_column('B:B', 10);
$worksheet->write( 'A1', 'Foo' );
$worksheet->write_comment( 'A1', 'Some text' );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format01.t 000644 000765 000024 00000003634 12241403703 022063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format(
color => '#9C0006',
bg_color => '#FFC7CE',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format02.t 000644 000765 000024 00000003447 12241403703 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = undef; # Test the null format.
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => '<',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format03.t 000644 000765 000024 00000004251 12241403703 022061 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( font_strikeout => 1, dxf_index => 1 );
my $format2 = $workbook->add_format( underline => 1, dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => 'between',
minimum => 2,
maximum => 6,
}
);
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format2,
criteria => 'greater than',
value => 1,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format04.t 000644 000765 000024 00000004203 12241403703 022057 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( num_format => 2, dxf_index => 1 );
my $format2 = $workbook->add_format( num_format => '0.000', dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '>',
value => 2,
}
);
$worksheet->conditional_formatting( 'A2',
{
type => 'cell',
format => $format2,
criteria => '<',
value => 8,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format05.t 000644 000765 000024 00000003462 12241403703 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( border => 1 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '==',
value => 7,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format06.t 000644 000765 000024 00000003556 12241403703 022073 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format(
pattern => 15,
fg_color => '#FF0000',
bg_color => '#FFFF00'
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format1,
criteria => '>',
value => 7,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format07.t 000644 000765 000024 00000005146 12241403703 022071 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( bg_color => '#FF0000', dxf_index => 1 );
my $format2 = $workbook->add_format( bg_color => '#92D050', dxf_index => 0 );
my $data = [
[ 90, 80, 50, 10, 20, 90, 40, 90, 30, 40 ],
[ 20, 10, 90, 100, 30, 60, 70, 60, 50, 90 ],
[ 10, 50, 60, 50, 20, 50, 80, 30, 40, 60 ],
[ 10, 90, 20, 40, 10, 40, 50, 70, 90, 50 ],
[ 70, 100, 10, 90, 10, 10, 20, 100, 100, 40 ],
[ 20, 60, 10, 100, 30, 10, 20, 60, 100, 10 ],
[ 10, 60, 10, 80, 100, 80, 30, 30, 70, 40 ],
[ 30, 90, 60, 10, 10, 100, 40, 40, 30, 40 ],
[ 80, 90, 10, 20, 20, 50, 80, 20, 60, 90 ],
[ 60, 80, 30, 30, 10, 50, 80, 60, 50, 30 ],
];
$worksheet->write_col( 'A1', $data );
$worksheet->conditional_formatting( 'A1:J10',
{
type => 'cell',
format => $format1,
criteria => '>=',
value => 50,
}
);
$worksheet->conditional_formatting( 'A1:J10',
{
type => 'cell',
format => $format2,
criteria => '<',
value => 50,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format08.t 000644 000765 000024 00000003634 12241403703 022072 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format(
color => '#9C6500',
bg_color => '#FFEB9C',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format09.t 000644 000765 000024 00000003710 12241403703 022066 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx9_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Light yellow fill with dark yellow text.
my $format = $workbook->add_format(
color => '#9C6500',
bg_color => '#FFEB9C',
font_condense => 1,
font_extend => 1
);
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
$worksheet->conditional_formatting( 'A1',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 5
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format10.t 000644 000765 000024 00000003567 12241403703 022070 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bold => 1, italic => 1 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format11.t 000644 000765 000024 00000003633 12241403703 022063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bg_color => '#FFFF00', fg_color => '#FF0000', pattern => 1 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format12.t 000644 000765 000024 00000003634 12241403703 022065 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( bg_color => '#FFFF00', fg_color => '#FF0000', pattern => 12 );
$worksheet->write( 'A1', 'Hello', $format );
$worksheet->write( 'B3', 10 );
$worksheet->write( 'B4', 20 );
$worksheet->write( 'B5', 30 );
$worksheet->write( 'B6', 40 );
$worksheet->conditional_formatting( 'B3:B6',
{
type => 'cell',
format => $format,
criteria => 'greater than',
value => 20
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/cond_format13.t 000644 000765 000024 00000004230 12241504633 022063 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'cond_format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx13_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# We manually set the indices to get the same order as the target file.
my $format1 = $workbook->add_format( num_format => 2, dxf_index => 1 );
my $format2 = $workbook->add_format( num_format => '0.000', dxf_index => 0 );
$worksheet->write( 'A1', 10 );
$worksheet->write( 'A2', 20 );
$worksheet->write( 'A3', 30 );
$worksheet->write( 'A4', 40 );
my $options = {
type => 'cell',
format => $format1,
criteria => '>',
value => 2,
};
$worksheet->conditional_formatting( 'A1', $options );
# Test re-using options, issue #79.
$options->{criteria} = '<';
$options->{value} = 8;
$options->{format} = $format2;
$worksheet->conditional_formatting( 'A2', $options);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/custom_colors01.t 000644 000765 000024 00000003524 12241403703 022461 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'custom_colors01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with custom colours.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->set_custom_color( 40, '#26DA55' );
$workbook->set_custom_color( 41, '#792DC8' );
$workbook->set_custom_color( 42, '#646462' );
my $color1 = $workbook->add_format( bg_color => 40 );
my $color2 = $workbook->add_format( bg_color => 41 );
my $color3 = $workbook->add_format( bg_color => 42 );
$worksheet->write( 'A1', 'Foo', $color1 );
$worksheet->write( 'A2', 'Foo', $color2 );
$worksheet->write( 'A3', 'Foo', $color3 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/date_1904_01.t 000644 000765 000024 00000003607 12241403703 021321 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_1904_01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with date times in 1900 and
# 1904 epochs.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( num_format => 14 );
$worksheet->set_column( 'A:A', 12 );
$worksheet->write_date_time( 'A1', '1900-01-00T', $format );
$worksheet->write_date_time( 'A2', '1902-09-26T', $format );
$worksheet->write_date_time( 'A3', '1913-09-08T', $format );
$worksheet->write_date_time( 'A4', '1927-05-18T', $format );
$worksheet->write_date_time( 'A5', '2173-10-14T', $format );
$worksheet->write_date_time( 'A6', '4637-11-26T', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/date_1904_02.t 000644 000765 000024 00000003640 12241403703 021317 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_1904_02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a Excel::Writer::XLSX file with date times in 1900 and
# 1904 epochs.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_1904();
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( num_format => 14 );
$worksheet->set_column( 'A:A', 12 );
$worksheet->write_date_time( 'A1', '1904-01-01T', $format );
$worksheet->write_date_time( 'A2', '1906-09-27T', $format );
$worksheet->write_date_time( 'A3', '1917-09-09T', $format );
$worksheet->write_date_time( 'A4', '1931-05-19T', $format );
$worksheet->write_date_time( 'A5', '2177-10-15T', $format );
$worksheet->write_date_time( 'A6', '4641-11-27T', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/date_examples01.t 000644 000765 000024 00000004642 12241403703 022403 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'date_examples01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = ['xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels'];
my $ignore_elements = {};
###############################################################################
#
# Example spreadsheet used in the tutorial.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_column( 'A:A', 30 ); # For extra visibility.
my $number = 41333.5;
$worksheet->write( 'A1', $number ); # 413333.5
my $format2 = $workbook->add_format( num_format => 'dd/mm/yy' );
$worksheet->write( 'A2', $number, $format2 ); # 28/02/13
my $format3 = $workbook->add_format( num_format => 'mm/dd/yy' );
$worksheet->write( 'A3', $number, $format3 ); # 02/28/13
my $format4 = $workbook->add_format( num_format => 'd\\-m\\-yyyy' );
$worksheet->write( 'A4', $number, $format4 ); # 28-2-2013
my $format5 = $workbook->add_format( num_format => 'dd/mm/yy\\ hh:mm' );
$worksheet->write( 'A5', $number, $format5 ); # 28/02/13 12:00
my $format6 = $workbook->add_format( num_format => 'd\\ mmm\\ yyyy' );
$worksheet->write( 'A6', $number, $format6 ); # 28 Feb 2013
my $format7 = $workbook->add_format( num_format => 'mmm\\ d\\ yyyy\\ hh:mm\\ AM/PM' );
$worksheet->write('A7', $number , $format7); # Feb 28 2013 12:00 PM
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/default_row01.t 000644 000765 000024 00000003001 12241403703 022067 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/default_row02.t 000644 000765 000024 00000003106 12241403703 022076 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( undef, 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
for my $row (1 .. 8) {
$worksheet->set_row( $row, 15 );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/default_row03.t 000644 000765 000024 00000003103 12241403703 022074 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24, 1 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
for my $row (1 .. 8) {
$worksheet->set_row( $row, 24 );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/default_row04.t 000644 000765 000024 00000003232 12241403703 022100 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'default_row04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_default_row( 24 );
$worksheet->write( 'A1', 'Foo' );
$worksheet->write( 'A10', 'Bar' );
$worksheet->write_comment( 'C4', 'Hello', y_offset => 22 );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( 'John' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/defined_name01.t 000644 000765 000024 00000004620 12241403703 022162 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet('Sheet 3');
$worksheet1->print_area( 'A1:E6' );
$worksheet1->autofilter('F1:G1');
$worksheet1->write( 'G1', 'Filter' );
$worksheet1->write( 'F1', 'Auto' );
$worksheet1->fit_to_pages( 2, 2 );
$workbook->define_name( q('Sheet 3'!Bar), q(='Sheet 3'!$A$1) );
$workbook->define_name( q(Abc), q(=Sheet1!$A$1) );
$workbook->define_name( q(Baz), q(=0.98) );
$workbook->define_name( q(Sheet1!Bar), q(=Sheet1!$A$1) );
$workbook->define_name( q(Sheet2!Bar), q(=Sheet2!$A$1) );
$workbook->define_name( q(Sheet2!aaa), q(=Sheet2!$A$1) );
$workbook->define_name( q(_Egg), q(=Sheet1!$A$1) );
$workbook->define_name( q(_Fog), q(=Sheet1!$A$1) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/defined_name02.t 000644 000765 000024 00000003337 12241403703 022167 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet('sheet One');
$workbook->define_name( "Sales", q(='sheet One'!$G$1:$H$10) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/defined_name03.t 000644 000765 000024 00000003333 12241403703 022164 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet('sheet One');
$workbook->define_name( "Sales", q(='sheet One'!G1:H10) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/defined_name04.t 000644 000765 000024 00000005475 12241707564 022212 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use utf8;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'defined_name04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with defined names.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test for valid Excel defined names.
$workbook->define_name( q(\\__), q(=Sheet1!$A$1) );
$workbook->define_name( q(a3f6), q(=Sheet1!$A$2) );
$workbook->define_name( q(afoo.bar), q(=Sheet1!$A$3) );
$workbook->define_name( q(УЉtude), q(=Sheet1!$A$4) );
$workbook->define_name( q(eУЉsumУЉ), q(=Sheet1!$A$5) );
$workbook->define_name( q(a), q(=Sheet1!$A$6) );
# The following are not valid Excel names and shouldn't be written to
# the output file. We also catch the warnings and ignore them.
local $SIG{__WARN__} = sub {};
eval {
$workbook->define_name( q(.abc), q(=Sheet1!$B$1) );
$workbook->define_name( q(GFG$), q(=Sheet1!$B$1) );
$workbook->define_name( q(A1), q(=Sheet1!$B$1) );
$workbook->define_name( q(XFD1048576), q(=Sheet1!$B$1) );
$workbook->define_name( q(1A), q(=Sheet1!$B$1) );
$workbook->define_name( q(A A), q(=Sheet1!$B$1) );
$workbook->define_name( q(c), q(=Sheet1!$B$1) );
$workbook->define_name( q(r), q(=Sheet1!$B$1) );
$workbook->define_name( q(C), q(=Sheet1!$B$1) );
$workbook->define_name( q(R), q(=Sheet1!$B$1) );
$workbook->define_name( q(R1), q(=Sheet1!$B$1) );
$workbook->define_name( q(C1), q(=Sheet1!$B$1) );
$workbook->define_name( q(R1C1), q(=Sheet1!$B$1) );
$workbook->define_name( q(R13C99), q(=Sheet1!$B$1) );
};
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes01.t 000644 000765 000024 00000004054 12241403703 021210 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet('5&4');
$worksheet->write_formula( 'A1', q{=IF(1>2,0,1)}, undef, 1 );
$worksheet->write_formula( 'A2', q{=CONCATENATE("'","<>&")}, undef, q{'<>&} );
$worksheet->write_formula( 'A3', q{=1&"b"}, undef, q{1b} );
$worksheet->write_formula( 'A4', q{="'"}, undef, q{'} );
$worksheet->write_formula( 'A5', q{=""""}, undef, q{"} );
$worksheet->write_formula( 'A6', q{="&" & "&"}, undef, q{&&} );
$worksheet->write_string( 'A8', q{"&<>} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes02.t 000644 000765 000024 00000003236 12241403703 021212 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', q{"<>'&} );
$worksheet->write_comment( 'B2', q{<>&"'} );
# Set the author to match the target XLSX file.
$worksheet->set_comments_author( q{I am '"<>&} );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes03.t 000644 000765 000024 00000003336 12241403703 021214 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
$worksheet->write( 'A1', 'Foo', $bold );
$worksheet->write( 'A2', 'Bar', $italic );
$worksheet->write_rich_string( 'A3', 'a', $bold, q{b"<>'c}, 'defg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes04.t 000644 000765 000024 00000003034 12241403703 021210 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.com/?a=1&b=2' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes05.t 000644 000765 000024 00000003147 12241403703 021216 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet( "Start" );
my $worksheet2 = $workbook->add_worksheet( "A & B" );
$worksheet1->write_url( 'A1', q(internal:'A & B'!A1), 'Jump to A & B' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes06.t 000644 000765 000024 00000003134 12241403703 021213 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), September 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { };
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file a num format that
# require XML escaping.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $num_format = $workbook->add_format( num_format => '[Red]0.0%\\ "a"' );
$worksheet->set_column('A:A', 14);
$worksheet->write( 'A1', 123, $num_format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes07.t 000644 000765 000024 00000003162 12241403703 021215 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', q(http://example.com/!"$%&'( )*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~) );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/escapes08.t 000644 000765 000024 00000003127 12241403703 021217 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'escapes08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test an already escapted string.
$worksheet->write_url( 'A1', 'http://example.com/%5b0%5d', 'http://example.com/[0]' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/filehandle01.t 000644 000765 000024 00000003250 12241403703 021655 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), May 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'filehandle01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file as a filehandle.
#
use Excel::Writer::XLSX;
open my $fh, '>', \my $str or die "Failed to open str filehandle: $!";
my $workbook = Excel::Writer::XLSX->new( $fh );
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Hello' );
$worksheet->write( 'A2', 123 );
$workbook->close();
open my $out_fh, '>', $got_filename or die "Failed to open out filehandle: $!";
binmode $out_fh;
print $out_fh $str;
close $out_fh;
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/firstsheet01.t 000644 000765 000024 00000004462 12241403703 021750 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'firstsheet01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
my $worksheet4 = $workbook->add_worksheet();
my $worksheet5 = $workbook->add_worksheet();
my $worksheet6 = $workbook->add_worksheet();
my $worksheet7 = $workbook->add_worksheet();
my $worksheet8 = $workbook->add_worksheet();
my $worksheet9 = $workbook->add_worksheet();
my $worksheet10 = $workbook->add_worksheet();
my $worksheet11 = $workbook->add_worksheet();
my $worksheet12 = $workbook->add_worksheet();
my $worksheet13 = $workbook->add_worksheet();
my $worksheet14 = $workbook->add_worksheet();
my $worksheet15 = $workbook->add_worksheet();
my $worksheet16 = $workbook->add_worksheet();
my $worksheet17 = $workbook->add_worksheet();
my $worksheet18 = $workbook->add_worksheet();
my $worksheet19 = $workbook->add_worksheet();
my $worksheet20 = $workbook->add_worksheet();
$worksheet8->set_first_sheet();
$worksheet20->activate();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/fit_to_page01.t 000644 000765 000024 00000003342 12241403703 022044 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages();
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/fit_to_page02.t 000644 000765 000024 00000003345 12241403703 022050 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/fit_to_page03.t 000644 000765 000024 00000003350 12241403703 022045 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 1, 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/fit_to_page04.t 000644 000765 000024 00000003350 12241403703 022046 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 3, 2 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/fit_to_page05.t 000644 000765 000024 00000003350 12241403703 022047 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'fit_to_pages05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->fit_to_pages( 1, 0 );
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/format01.t 000644 000765 000024 00000003620 12241403703 021053 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet('Data Sheet');
my $worksheet3 = $workbook->add_worksheet();
my $unused1 = $workbook->add_format( bold => 1 );
my $bold = $workbook->add_format( bold => 1 );
my $unused2 = $workbook->add_format( bold => 1 );
my $unued3 = $workbook->add_format( italic => 1 );
$worksheet1->write( 'A1', 'Foo' );
$worksheet1->write( 'A2', 123 );
$worksheet3->write( 'B2', 'Foo' );
$worksheet3->write( 'B3', 'Bar', $bold );
$worksheet3->write( 'C4', 234 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/format02.t 000644 000765 000024 00000003641 12241403703 021057 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row( 0, 30 );
my $format1 = $workbook->add_format(
font => "Arial",
bold => 1,
locked => 1,
rotation => 0,
align => "left",
valign => "bottom"
);
my $format2 = $workbook->add_format(
font => "Arial",
bold => 1,
locked => 1,
rotation => 90,
align => "center",
valign => "bottom"
);
$worksheet->write( 'A1', 'Foo', $format1 );
$worksheet->write( 'B1', 'Bar', $format2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/format03.t 000644 000765 000024 00000003263 12241403703 021060 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( bold => 1, fg_color => 'red' );
my $format2 = $workbook->add_format();
# Test the copy method.
$format2->copy($format1);
$format2->set_italic();
$worksheet->write( 'A1', 'Foo', $format1);
$worksheet->write( 'A2', 'Bar', $format2);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/format04.t 000644 000765 000024 00000003543 12241403703 021062 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with unused formats.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format1 = Excel::Writer::XLSX::Format->new();
my $format2 = $workbook->add_format( bold => 1 ); # Bold should be overwritten.
# Test the copy method.
$format2->copy($format1);
$format2->set_italic();
$format2->set_bold();
$worksheet->write( 'A1', 'Foo', $format2);
$worksheet->conditional_formatting(
'C1:C10',
{
type => 'cell',
criteria => '>',
value => 50,
format => $format2,
}
);
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/format05.t 000644 000765 000024 00000003050 12241403703 021054 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), December 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'format05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $wrap = $workbook->add_format( text_wrap => 1 );
$worksheet->set_row( 0, 45 );
$worksheet->write( 'A1', "Foo\nBar", $wrap );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/gridlines01.t 000644 000765 000024 00000003327 12241403703 021547 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'gridlines01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->hide_gridlines( 2 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hide01.t 000644 000765 000024 00000002776 12241403703 020507 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), March 2013, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hide01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet();
$worksheet2->hide();
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink01.t 000644 000765 000024 00000003066 12241403703 021574 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.org/' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink02.t 000644 000765 000024 00000003427 12241403703 021576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.org/' );
$worksheet->write_url( 'D4', 'http://www.perl.org/' );
$worksheet->write_url( 'A8', 'http://www.perl.org/' );
$worksheet->write_url( 'B6', 'http://www.cpan.org/' );
$worksheet->write_url( 'F12', 'http://www.cpan.org/' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink03.t 000644 000765 000024 00000003771 12241403703 021601 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->write_url( 'A1', 'http://www.perl.org/' );
$worksheet1->write_url( 'D4', 'http://www.perl.org/' );
$worksheet1->write_url( 'A8', 'http://www.perl.org/' );
$worksheet1->write_url( 'B6', 'http://www.cpan.org/' );
$worksheet1->write_url( 'F12', 'http://www.cpan.org/' );
$worksheet2->write_url( 'C2', 'http://www.google.com/' );
$worksheet2->write_url( 'C5', 'http://www.cpan.org/' );
$worksheet2->write_url( 'C7', 'http://www.perl.org/' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink04.t 000644 000765 000024 00000004136 12241403703 021576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
my $worksheet3 = $workbook->add_worksheet('Data Sheet');
$worksheet1->write_url( 'A1', q(internal:Sheet2!A1) );
$worksheet1->write_url( 'A3', q(internal:Sheet2!A1:A5) );
$worksheet1->write_url( 'A5', q(internal:'Data Sheet'!D5), 'Some text' );
$worksheet1->write_url( 'E12', q(internal:Sheet1!J1) );
$worksheet1->write_url( 'G17', q(internal:Sheet2!A1), 'Some text', undef );
$worksheet1->write_url( 'A18', q(internal:Sheet2!A1), undef, undef, 'Tool Tip 1' );
$worksheet1->write_url( 'A20', q(internal:Sheet2!A1), 'More text', undef, 'Tool Tip 2' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink05.t 000644 000765 000024 00000003447 12241403703 021603 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.org/' );
$worksheet->write_url( 'A3', 'http://www.perl.org/', 'Perl home' );
$worksheet->write_url( 'A5', 'http://www.perl.org/', 'Perl home', undef, 'Tool Tip' );
$worksheet->write_url( 'A7', 'http://www.cpan.org/', 'CPAN', undef, 'Download' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink06.t 000644 000765 000024 00000003344 12241403703 021600 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'external:C:\Temp\foo.xlsx' );
$worksheet->write_url( 'A3', 'external:C:\Temp\foo.xlsx#Sheet1!A1' );
$worksheet->write_url( 'A5', 'external:C:\Temp\foo.xlsx#Sheet1!A1', 'External', undef, 'Tip' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink07.t 000644 000765 000024 00000003213 12241403703 021574 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'external:\\\\VBOXSVR\share\foo.xlsx', 'J:\foo.xlsx' );
$worksheet->write_url( 'A3', 'external:foo.xlsx' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink08.t 000644 000765 000024 00000003317 12241403703 021602 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test with forward slashes instead of back slashes in hyperlink07.t.
$worksheet->write_url( 'A1', 'external://VBOXSVR/share/foo.xlsx', 'J:/foo.xlsx' );
$worksheet->write_url( 'A3', 'external:foo.xlsx' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink09.t 000644 000765 000024 00000003343 12241403703 021602 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'external:..\foo.xlsx' );
$worksheet->write_url( 'A3', 'external:..\foo.xlsx#Sheet1!A1' );
$worksheet->write_url( 'A5', 'external:\\\\VBOXSVR\share\foo.xlsx#Sheet1!B2', 'J:\foo.xlsx#Sheet1!B2' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink10.t 000644 000765 000024 00000003121 12241403703 021564 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has link formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( color => 'red', underline => 1 );
$worksheet->write_url( 'A1', 'http://www.perl.org/', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink11.t 000644 000765 000024 00000003122 12241403703 021566 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has link formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( color => 'blue', underline => 1 );
$worksheet->write_url( 'A1', 'http://www.perl.org/', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink12.t 000644 000765 000024 00000003223 12241403703 021571 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has link formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( color => 'blue', underline => 1 );
$worksheet->write_url( 'A1', 'mailto:jmcnamara@cpan.org', $format );
$worksheet->write_url( 'A3', 'ftp://perl.org/', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink13.t 000644 000765 000024 00000003121 12241403703 021567 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has writes a url in a range.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( align => 'center' );
$worksheet->merge_range( 'C4:E5', 'http://www.perl.org/', $format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink14.t 000644 000765 000024 00000003133 12241403703 021573 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), June 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has writes a url in a range.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $format = $workbook->add_format( align => 'center' );
$worksheet->merge_range( 'C4:E5', 'http://www.perl.org/', $format, 'Perl Home' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink15.t 000644 000765 000024 00000003144 12241403703 021576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'B2', 'external:subdir/blank.xlsx' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink16.t 000644 000765 000024 00000003146 12241403703 021601 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'B2', 'external:./subdir/blank.xlsx' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink17.t 000644 000765 000024 00000003201 12241403703 021572 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test URL with whitespace.
$worksheet->write_url( 'A1', 'http://google.com/some link' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink18.t 000644 000765 000024 00000003551 12241403703 021603 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# Test long URL at Excel limit.
$worksheet->write_url( 'A1', 'http://google.com/00000000001111111111222222222233333333334444444444555555555566666666666777777777778888888888999999999990000000000111111111122222222223333333333444444444455555555556666666666677777777777888888888899999999999000000000011111111112222222222x' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink19.t 000644 000765 000024 00000003553 12241403703 021606 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example doesn't have any link formatting and tests the relationship
# linkage code.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->write_url( 'A1', 'http://www.perl.com/' );
# Overwrite the URL string.
$worksheet->write_formula( 'A1', '=1+1', undef, 2 );
# Reset the SST for testing.
$workbook->{_str_total} = 0;
$workbook->{_str_unique} = 0;
$workbook->{_str_table} = {};
$workbook->{_str_array} = [];
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/hyperlink20.t 000644 000765 000024 00000003472 12241403703 021576 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'hyperlink20.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with hyperlinks.
# This example has link formatting.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
# Simulate custom colour for testing.
$workbook->{_custom_colors} = [ 'FF0000FF' ];
my $worksheet = $workbook->add_worksheet();
my $format1 = $workbook->add_format( color => 'blue', underline => 1 );
my $format2 = $workbook->add_format( color => 'red', underline => 1 );
$worksheet->write_url( 'A1', 'http://www.python.org/1', $format1 );
$worksheet->write_url( 'A2', 'http://www.python.org/2', $format2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image01.t 000644 000765 000024 00000002727 12241403703 020654 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'E9', $dir . 'images/red.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image02.t 000644 000765 000024 00000002740 12241403703 020650 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'D7', $dir . 'images/yellow.png', 1, 2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image03.t 000644 000765 000024 00000002727 12241403703 020656 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'E9', $dir . 'images/red.jpg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image04.t 000644 000765 000024 00000002727 12241403703 020657 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'E9', $dir . 'images/red.bmp' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image05.t 000644 000765 000024 00000003221 12241403703 020646 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'A1', $dir . 'images/blue.png' );
$worksheet->insert_image( 'B3', $dir . 'images/red.jpg' );
$worksheet->insert_image( 'D5', $dir . 'images/yellow.jpg' );
$worksheet->insert_image( 'F9', $dir . 'images/grey.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image06.t 000644 000765 000024 00000003571 12241403703 020657 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
my $chart = $workbook->add_chart( type => 'bar', embedded => 1 );
# For testing, copy the randomly generated axis ids in the target xlsx file.
$chart->{_axis_ids} = [ 46335488, 46364544 ];
my $data = [
[ 1, 2, 3, 4, 5 ],
[ 2, 4, 6, 8, 10 ],
[ 3, 6, 9, 12, 15 ],
];
$worksheet->write( 'A1', $data );
$chart->add_series( values => '=Sheet1!$A$1:$A$5' );
$worksheet->insert_chart( 'E9', $chart );
$worksheet->insert_image( 'F2', $dir . 'images/red.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image07.t 000644 000765 000024 00000003106 12241403703 020652 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet1 = $workbook->add_worksheet();
my $worksheet2 = $workbook->add_worksheet();
$worksheet1->insert_image( 'E9', $dir . 'images/red.png' );
$worksheet2->insert_image( 'E9', $dir . 'images/yellow.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image08.t 000644 000765 000024 00000002751 12241403703 020660 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'B3', $dir . 'images/grey.png', 0, 0, 0.5, 0.5 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image09.t 000644 000765 000024 00000002735 12241403703 020663 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image09.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'E9', $dir . 'images/red_64x20.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image10.t 000644 000765 000024 00000002730 12241403703 020646 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image10.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'C2', $dir . 'images/logo.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image11.t 000644 000765 000024 00000002736 12241403703 020655 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image11.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'C2', $dir . 'images/logo.png', 8, 5 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image12.t 000644 000765 000024 00000003030 12241403703 020642 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image12.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 75);
$worksheet->set_column('C:C', 32);
$worksheet->insert_image( 'C2', $dir . 'images/logo.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image13.t 000644 000765 000024 00000003036 12241403703 020651 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image13.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 75);
$worksheet->set_column('C:C', 32);
$worksheet->insert_image( 'C2', $dir . 'images/logo.png', 8, 5 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image14.t 000644 000765 000024 00000003140 12241403703 020646 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image14.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 4.5);
$worksheet->set_row(2, 35.25);
$worksheet->set_column('C:E', 3.29);
$worksheet->set_column('F:F', 10.71);
$worksheet->insert_image( 'C2', $dir . 'images/logo.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image15.t 000644 000765 000024 00000003147 12241403703 020656 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image15.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 4.5);
$worksheet->set_row(2, 35.25);
$worksheet->set_column('C:E', 3.29);
$worksheet->set_column('F:F', 10.71);
$worksheet->insert_image( 'C2', $dir . 'images/logo.png', 13, 2 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image16.t 000644 000765 000024 00000002733 12241403703 020657 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image16.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'C2', $dir . 'images/issue32.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image17.t 000644 000765 000024 00000003033 12241403703 020652 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image17.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 96);
$worksheet->set_column('C:C', 18);
$worksheet->insert_image( 'C2', $dir . 'images/issue32.png' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image18.t 000644 000765 000024 00000003041 12241403703 020652 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image18.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_row(1, 96);
$worksheet->set_column('C:C', 18);
$worksheet->insert_image( 'C2', $dir . 'images/issue32.png', 5, 5 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/image19.t 000644 000765 000024 00000002731 12241403703 020660 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), April 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'image19.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file with image(s).
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->insert_image( 'C2', $dir . 'images/train.jpg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/images/ 000755 000765 000024 00000000000 12260573477 020522 5 ustar 00John staff 000000 000000 Excel-Writer-XLSX-0.76/t/regression/macro01.t 000644 000765 000024 00000002766 12241403703 020676 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), November 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'macro01.xlsm';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$workbook->add_vba_project( $dir . 'xlsx_files/vbaProject01.bin' );
$worksheet->write( 'A1', 123 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize01.t 000644 000765 000024 00000002770 12241403703 021430 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Hello' );
$worksheet->write( 'A2', 123 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize02.t 000644 000765 000024 00000003136 12241403703 021426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
$worksheet->write( 'A1', 'Hello' );
$worksheet->write( 'A2', 123 );
# This should be ignored since later row has already been written.
$worksheet->write( 'G1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize03.t 000644 000765 000024 00000006011 12241403703 021422 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
$worksheet->set_column( 'A:A', 36, $bold );
$worksheet->set_column( 'B:B', 20 );
$worksheet->set_row( 0, 40 );
my $heading = $workbook->add_format(
bold => 1,
color => 'blue',
size => 16,
merge => 1,
align => 'vcenter',
);
my $hyperlink_format = $workbook->add_format(
color => 'blue',
underline => 1,
);
my @headings = ( 'Features of Excel::Writer::XLSX', '' );
$worksheet->write_row( 'A1', \@headings, $heading );
my $text_format = $workbook->add_format(
bold => 1,
italic => 1,
color => 'red',
size => 18,
font => 'Lucida Calligraphy'
);
$worksheet->write( 'A2', "Text" );
$worksheet->write( 'B2', "Hello Excel" );
$worksheet->write( 'A3', "Formatted text" );
$worksheet->write( 'B3', "Hello Excel", $text_format );
$worksheet->write( 'A4', "Unicode text" );
$worksheet->write( 'B4', "\x{0410} \x{0411} \x{0412} \x{0413} \x{0414}" );
my $num1_format = $workbook->add_format( num_format => '$#,##0.00' );
my $num2_format = $workbook->add_format( num_format => ' d mmmm yyy' );
$worksheet->write( 'A5', "Numbers" );
$worksheet->write( 'B5', 1234.56 );
$worksheet->write( 'A6', "Formatted numbers" );
$worksheet->write( 'B6', 1234.56, $num1_format );
$worksheet->write( 'A7', "Formatted numbers" );
$worksheet->write( 'B7', 37257, $num2_format );
$worksheet->set_selection( 'B8' );
$worksheet->write( 'A8', 'Formulas and functions, "=SIN(PI()/4)"' );
$worksheet->write( 'B8', '=SIN(PI()/4)' );
$worksheet->write( 'A9', "Hyperlinks" );
$worksheet->write( 'B9', 'http://www.perl.com/', $hyperlink_format );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize04.t 000644 000765 000024 00000003260 12241403703 021426 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
$worksheet->write( 'A1', 'Foo', $bold );
$worksheet->write( 'A2', 'Bar', $italic );
$worksheet->write_rich_string( 'A3', 'a', $bold, 'bc', 'defg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize05.t 000644 000765 000024 00000003767 12241403703 021443 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
$worksheet->write( 'A1', 'Foo', $bold );
$worksheet->write( 'A2', 'Bar', $italic );
$worksheet->write_rich_string( 'A3', 'a', $bold, 'bc', 'defg' );
$worksheet->write_rich_string( 'B4', 'abc', $italic, 'de', 'fg' );
$worksheet->write_rich_string( 'C5', 'a', $bold, 'bc', 'defg' );
$worksheet->write_rich_string( 'D6', 'abc', $italic, 'de', 'fg' );
$worksheet->write_rich_string( 'E7', 'a', $bold, 'bcdef', 'g' );
$worksheet->write_rich_string( 'F8', $italic, 'abcd', 'efg' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize06.t 000644 000765 000024 00000003344 12241403703 021433 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
# Test that control characters and any other single byte characters are
# handled correctly by the SharedStrings module. We skip chr 34 = " in
# this test since it isn't encoded by Excel as ".
for my $i ( 0 .. 33, 35 .. 255 ) {
my $char = chr $i;
$worksheet->write_string( $i, 0, $char );
}
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize07.t 000644 000765 000024 00000003462 12241403703 021435 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2012, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
# Test that the Excel/Unicode escape for control characters, _xHHHH_ is
# also escaped when written as a literal string.
my @strings = (
"_",
"_x",
"_x0",
"_x00",
"_x000",
"_x0000",
"_x0000_",
"_x005F_",
"_x000G_",
"_X0000_",
"_x000a_",
"_x000A_",
"_x0000__x0000_",
"__x0000__",
);
$worksheet->write_col( 0, 0, \@strings );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/optimize08.t 000644 000765 000024 00000003332 12241403703 021432 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'optimize08.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test the creation of a simple Excel::Writer::XLSX file.
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
$workbook->set_optimization();
my $worksheet = $workbook->add_worksheet();
my $bold = $workbook->add_format( bold => 1 );
my $italic = $workbook->add_format( italic => 1 );
$worksheet->write( 'A1', 'Foo', $bold );
$worksheet->write( 'A2', 'Bar', $italic );
# Verify that whitespace is preserved.
$worksheet->write_rich_string( 'A3', ' a', $bold, 'bc', 'defg ' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline01.t 000644 000765 000024 00000007052 12241403703 021245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet( 'Outlined Rows' );
# Add a general format
my $bold = $workbook->add_format( bold => 1 );
# For outlines the important parameters are $hidden and $level. Rows with the
# same $level are grouped together. The group will be collapsed if $hidden is
# non-zero. $height and $XF are assigned default values if they are undef.
#
# The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed)
#
$worksheet1->set_row( 1, undef, undef, 0, 2 );
$worksheet1->set_row( 2, undef, undef, 0, 2 );
$worksheet1->set_row( 3, undef, undef, 0, 2 );
$worksheet1->set_row( 4, undef, undef, 0, 2 );
$worksheet1->set_row( 5, undef, undef, 0, 1 );
$worksheet1->set_row( 6, undef, undef, 0, 2 );
$worksheet1->set_row( 7, undef, undef, 0, 2 );
$worksheet1->set_row( 8, undef, undef, 0, 2 );
$worksheet1->set_row( 9, undef, undef, 0, 2 );
$worksheet1->set_row( 10, undef, undef, 0, 1 );
# Add a column format for clarity
$worksheet1->set_column( 'A:A', 20 );
# Add the data, labels and formulas
$worksheet1->write( 'A1', 'Region', $bold );
$worksheet1->write( 'A2', 'North' );
$worksheet1->write( 'A3', 'North' );
$worksheet1->write( 'A4', 'North' );
$worksheet1->write( 'A5', 'North' );
$worksheet1->write( 'A6', 'North Total', $bold );
$worksheet1->write( 'B1', 'Sales', $bold );
$worksheet1->write( 'B2', 1000 );
$worksheet1->write( 'B3', 1200 );
$worksheet1->write( 'B4', 900 );
$worksheet1->write( 'B5', 1200 );
$worksheet1->write( 'B6', '=SUBTOTAL(9,B2:B5)', $bold, 4300 );
$worksheet1->write( 'A7', 'South' );
$worksheet1->write( 'A8', 'South' );
$worksheet1->write( 'A9', 'South' );
$worksheet1->write( 'A10', 'South' );
$worksheet1->write( 'A11', 'South Total', $bold );
$worksheet1->write( 'B7', 400 );
$worksheet1->write( 'B8', 600 );
$worksheet1->write( 'B9', 500 );
$worksheet1->write( 'B10', 600 );
$worksheet1->write( 'B11', '=SUBTOTAL(9,B7:B10)', $bold, 2100 );
$worksheet1->write( 'A12', 'Grand Total', $bold );
$worksheet1->write( 'B12', '=SUBTOTAL(9,B2:B10)', $bold, 6400 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline02.t 000644 000765 000024 00000007111 12241403703 021242 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet2 = $workbook->add_worksheet( 'Collapsed Rows' );
# Add a general format
my $bold = $workbook->add_format( bold => 1 );
# Create a worksheet with outlined rows. This is the same as the
# previous example except that the rows are collapsed.
# The group will be collapsed if $hidden is non-zero.
# The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed)
#
$worksheet2->set_row( 1, undef, undef, 1, 2 );
$worksheet2->set_row( 2, undef, undef, 1, 2 );
$worksheet2->set_row( 3, undef, undef, 1, 2 );
$worksheet2->set_row( 4, undef, undef, 1, 2 );
$worksheet2->set_row( 5, undef, undef, 1, 1 );
$worksheet2->set_row( 6, undef, undef, 1, 2 );
$worksheet2->set_row( 7, undef, undef, 1, 2 );
$worksheet2->set_row( 8, undef, undef, 1, 2 );
$worksheet2->set_row( 9, undef, undef, 1, 2 );
$worksheet2->set_row( 10, undef, undef, 1, 1 );
$worksheet2->set_row( 11, undef, undef, 0, 0, 1 );
# Add a column format for clarity
$worksheet2->set_column( 'A:A', 20 );
$worksheet2->set_selection( 'A14' );
# Add the data, labels and formulas
$worksheet2->write( 'A1', 'Region', $bold );
$worksheet2->write( 'A2', 'North' );
$worksheet2->write( 'A3', 'North' );
$worksheet2->write( 'A4', 'North' );
$worksheet2->write( 'A5', 'North' );
$worksheet2->write( 'A6', 'North Total', $bold );
$worksheet2->write( 'B1', 'Sales', $bold );
$worksheet2->write( 'B2', 1000 );
$worksheet2->write( 'B3', 1200 );
$worksheet2->write( 'B4', 900 );
$worksheet2->write( 'B5', 1200 );
$worksheet2->write( 'B6', '=SUBTOTAL(9,B2:B5)', $bold, 4300 );
$worksheet2->write( 'A7', 'South' );
$worksheet2->write( 'A8', 'South' );
$worksheet2->write( 'A9', 'South' );
$worksheet2->write( 'A10', 'South' );
$worksheet2->write( 'A11', 'South Total', $bold );
$worksheet2->write( 'B7', 400 );
$worksheet2->write( 'B8', 600 );
$worksheet2->write( 'B9', 500 );
$worksheet2->write( 'B10', 600 );
$worksheet2->write( 'B11', '=SUBTOTAL(9,B7:B10)', $bold, 2100 );
$worksheet2->write( 'A12', 'Grand Total', $bold );
$worksheet2->write( 'B12', '=SUBTOTAL(9,B2:B10)', $bold, 6400 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline03.t 000644 000765 000024 00000005312 12241403703 021244 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet3 = $workbook->add_worksheet( 'Outline Columns' );
# Add a general format
my $bold = $workbook->add_format( bold => 1 );
# Example 3: Create a worksheet with outlined columns.
my $data = [
[ 'Month', 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Total' ],
[ 'North', 50, 20, 15, 25, 65, 80, ],
[ 'South', 10, 20, 30, 50, 50, 50, ],
[ 'East', 45, 75, 50, 15, 75, 100, ],
[ 'West', 15, 15, 55, 35, 20, 50, ],
];
# Add bold format to the first row
$worksheet3->set_row( 0, undef, $bold );
# Syntax: set_column($col1, $col2, $width, $XF, $hidden, $level, $collapsed)
$worksheet3->set_column( 'A:A', 10, $bold );
$worksheet3->set_column( 'B:G', 6, undef, 0, 1 );
$worksheet3->set_column( 'H:H', 10 );
# Write the data and a formula
$worksheet3->write_col( 'A1', $data );
$worksheet3->write( 'H2', '=SUM(B2:G2)', undef, 255 );
$worksheet3->write( 'H3', '=SUM(B3:G3)', undef, 210 );
$worksheet3->write( 'H4', '=SUM(B4:G4)', undef, 360 );
$worksheet3->write( 'H5', '=SUM(B5:G5)', undef, 190 );
$worksheet3->write( 'H6', '=SUM(H2:H5)', $bold, 1015 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline04.t 000644 000765 000024 00000005026 12241403703 021247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet4 = $workbook->add_worksheet( 'Outline levels' );
# Example 4: Show all possible outline levels.
#
my $levels = [
"Level 1", "Level 2", "Level 3", "Level 4", "Level 5", "Level 6",
"Level 7", "Level 6", "Level 5", "Level 4", "Level 3", "Level 2",
"Level 1"
];
$worksheet4->write_col( 'A1', $levels );
$worksheet4->set_row( 0, undef, undef, undef, 1 );
$worksheet4->set_row( 1, undef, undef, undef, 2 );
$worksheet4->set_row( 2, undef, undef, undef, 3 );
$worksheet4->set_row( 3, undef, undef, undef, 4 );
$worksheet4->set_row( 4, undef, undef, undef, 5 );
$worksheet4->set_row( 5, undef, undef, undef, 6 );
$worksheet4->set_row( 6, undef, undef, undef, 7 );
$worksheet4->set_row( 7, undef, undef, undef, 6 );
$worksheet4->set_row( 8, undef, undef, undef, 5 );
$worksheet4->set_row( 9, undef, undef, undef, 4 );
$worksheet4->set_row( 10, undef, undef, undef, 3 );
$worksheet4->set_row( 11, undef, undef, undef, 2 );
$worksheet4->set_row( 12, undef, undef, undef, 1 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline05.t 000644 000765 000024 00000007120 12241403703 021245 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet2 = $workbook->add_worksheet( 'Collapsed Rows' );
# Add a general format
my $bold = $workbook->add_format( bold => 1 );
# Create a worksheet with outlined rows. This is the same as the
# previous example except that the rows are collapsed.
# The group will be collapsed if $hidden is non-zero.
# The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed)
#
$worksheet2->set_row( 1, undef, undef, 1, 2 );
$worksheet2->set_row( 2, undef, undef, 1, 2 );
$worksheet2->set_row( 3, undef, undef, 1, 2 );
$worksheet2->set_row( 4, undef, undef, 1, 2 );
$worksheet2->set_row( 5, undef, undef, 1, 1, 1 );
$worksheet2->set_row( 6, undef, undef, 1, 2 );
$worksheet2->set_row( 7, undef, undef, 1, 2 );
$worksheet2->set_row( 8, undef, undef, 1, 2 );
$worksheet2->set_row( 9, undef, undef, 1, 2 );
$worksheet2->set_row( 10, undef, undef, 1, 1, 1 );
$worksheet2->set_row( 11, undef, undef, 0, 0, 1 );
# Add a column format for clarity
$worksheet2->set_column( 'A:A', 20 );
$worksheet2->set_selection( 'A14' );
# Add the data, labels and formulas
$worksheet2->write( 'A1', 'Region', $bold );
$worksheet2->write( 'A2', 'North' );
$worksheet2->write( 'A3', 'North' );
$worksheet2->write( 'A4', 'North' );
$worksheet2->write( 'A5', 'North' );
$worksheet2->write( 'A6', 'North Total', $bold );
$worksheet2->write( 'B1', 'Sales', $bold );
$worksheet2->write( 'B2', 1000 );
$worksheet2->write( 'B3', 1200 );
$worksheet2->write( 'B4', 900 );
$worksheet2->write( 'B5', 1200 );
$worksheet2->write( 'B6', '=SUBTOTAL(9,B2:B5)', $bold, 4300 );
$worksheet2->write( 'A7', 'South' );
$worksheet2->write( 'A8', 'South' );
$worksheet2->write( 'A9', 'South' );
$worksheet2->write( 'A10', 'South' );
$worksheet2->write( 'A11', 'South Total', $bold );
$worksheet2->write( 'B7', 400 );
$worksheet2->write( 'B8', 600 );
$worksheet2->write( 'B9', 500 );
$worksheet2->write( 'B10', 600 );
$worksheet2->write( 'B11', '=SUBTOTAL(9,B7:B10)', $bold, 2100 );
$worksheet2->write( 'A12', 'Grand Total', $bold );
$worksheet2->write( 'B12', '=SUBTOTAL(9,B2:B10)', $bold, 6400 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/outline06.t 000644 000765 000024 00000007130 12241403703 021247 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), October 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'outline06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members =
[ 'xl/calcChain.xml', '\[Content_Types\].xml', 'xl/_rels/workbook.xml.rels' ];
my $ignore_elements = { 'xl/workbook.xml' => ['new( $got_filename );
my $worksheet1 = $workbook->add_worksheet( 'Outlined Rows' );
$worksheet1->outline_settings( 0, 0, 0, 1 );
# Add a general format
my $bold = $workbook->add_format( bold => 1 );
# For outlines the important parameters are $hidden and $level. Rows with the
# same $level are grouped together. The group will be collapsed if $hidden is
# non-zero. $height and $XF are assigned default values if they are undef.
#
# The syntax is: set_row($row, $height, $XF, $hidden, $level, $collapsed)
#
$worksheet1->set_row( 1, undef, undef, 0, 2 );
$worksheet1->set_row( 2, undef, undef, 0, 2 );
$worksheet1->set_row( 3, undef, undef, 0, 2 );
$worksheet1->set_row( 4, undef, undef, 0, 2 );
$worksheet1->set_row( 5, undef, undef, 0, 1 );
$worksheet1->set_row( 6, undef, undef, 0, 2 );
$worksheet1->set_row( 7, undef, undef, 0, 2 );
$worksheet1->set_row( 8, undef, undef, 0, 2 );
$worksheet1->set_row( 9, undef, undef, 0, 2 );
$worksheet1->set_row( 10, undef, undef, 0, 1 );
# Add a column format for clarity
$worksheet1->set_column( 'A:A', 20 );
# Add the data, labels and formulas
$worksheet1->write( 'A1', 'Region', $bold );
$worksheet1->write( 'A2', 'North' );
$worksheet1->write( 'A3', 'North' );
$worksheet1->write( 'A4', 'North' );
$worksheet1->write( 'A5', 'North' );
$worksheet1->write( 'A6', 'North Total', $bold );
$worksheet1->write( 'B1', 'Sales', $bold );
$worksheet1->write( 'B2', 1000 );
$worksheet1->write( 'B3', 1200 );
$worksheet1->write( 'B4', 900 );
$worksheet1->write( 'B5', 1200 );
$worksheet1->write( 'B6', '=SUBTOTAL(9,B2:B5)', $bold, 4300 );
$worksheet1->write( 'A7', 'South' );
$worksheet1->write( 'A8', 'South' );
$worksheet1->write( 'A9', 'South' );
$worksheet1->write( 'A10', 'South' );
$worksheet1->write( 'A11', 'South Total', $bold );
$worksheet1->write( 'B7', 400 );
$worksheet1->write( 'B8', 600 );
$worksheet1->write( 'B9', 500 );
$worksheet1->write( 'B10', 600 );
$worksheet1->write( 'B11', '=SUBTOTAL(9,B7:B10)', $bold, 2100 );
$worksheet1->write( 'A12', 'Grand Total', $bold );
$worksheet1->write( 'B12', '=SUBTOTAL(9,B2:B10)', $bold, 6400 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks01.t 000644 000765 000024 00000003331 12241403703 022025 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_h_pagebreaks( 1 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks02.t 000644 000765 000024 00000003343 12241403703 022031 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_h_pagebreaks( 15, 7, 3, 0 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks03.t 000644 000765 000024 00000003341 12241403703 022030 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_h_pagebreaks( 0 .. 1028 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks04.t 000644 000765 000024 00000003331 12241403703 022030 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_v_pagebreaks( 1 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks05.t 000644 000765 000024 00000003342 12241403703 022033 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_v_pagebreaks( 8, 3, 1, 0 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_breaks06.t 000644 000765 000024 00000003425 12241403703 022036 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_breaks06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_h_pagebreaks( 1, 5, 13, 8, 8, 8 );
$worksheet->set_v_pagebreaks( 8, 3, 1, 0 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/page_view01.t 000644 000765 000024 00000003323 12241403703 021531 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'page_view01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->set_page_view();
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/panes01.t 000644 000765 000024 00000005562 12241403703 020700 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'panes01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [];
my $ignore_elements = {};
###############################################################################
#
# Test an Excel::Writer::XLSX file with panes..
#
use Excel::Writer::XLSX;
my $workbook = Excel::Writer::XLSX->new( $got_filename );
my $worksheet01 = $workbook->add_worksheet();
my $worksheet02 = $workbook->add_worksheet();
my $worksheet03 = $workbook->add_worksheet();
my $worksheet04 = $workbook->add_worksheet();
my $worksheet05 = $workbook->add_worksheet();
my $worksheet06 = $workbook->add_worksheet();
my $worksheet07 = $workbook->add_worksheet();
my $worksheet08 = $workbook->add_worksheet();
my $worksheet09 = $workbook->add_worksheet();
my $worksheet10 = $workbook->add_worksheet();
my $worksheet11 = $workbook->add_worksheet();
my $worksheet12 = $workbook->add_worksheet();
my $worksheet13 = $workbook->add_worksheet();
$worksheet01->write( 'A1', 'Foo' );
$worksheet02->write( 'A1', 'Foo' );
$worksheet03->write( 'A1', 'Foo' );
$worksheet04->write( 'A1', 'Foo' );
$worksheet05->write( 'A1', 'Foo' );
$worksheet06->write( 'A1', 'Foo' );
$worksheet07->write( 'A1', 'Foo' );
$worksheet08->write( 'A1', 'Foo' );
$worksheet09->write( 'A1', 'Foo' );
$worksheet10->write( 'A1', 'Foo' );
$worksheet11->write( 'A1', 'Foo' );
$worksheet12->write( 'A1', 'Foo' );
$worksheet13->write( 'A1', 'Foo' );
$worksheet01->freeze_panes( 'A2' );
$worksheet02->freeze_panes( 'A3' );
$worksheet03->freeze_panes( 'B1' );
$worksheet04->freeze_panes( 'C1' );
$worksheet05->freeze_panes( 'B2' );
$worksheet06->freeze_panes( 'G4' );
$worksheet07->freeze_panes( 3, 6, 3, 6, 1 );
$worksheet08->split_panes( 15, 0 );
$worksheet09->split_panes( 30, 0 );
$worksheet10->split_panes( 0, 8.46 );
$worksheet11->split_panes( 0, 17.57 );
$worksheet12->split_panes( 15, 8.46 );
$worksheet13->split_panes( 45, 54.14 );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_across01.t 000644 000765 000024 00000003340 12241403703 022270 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_across01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_across();
$worksheet->set_paper( 9 );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area01.t 000644 000765 000024 00000003331 12241403703 021706 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:A1' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area02.t 000644 000765 000024 00000003331 12241403703 021707 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area02.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:G1' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area03.t 000644 000765 000024 00000003333 12241403703 021712 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area03.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:XFD1' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area04.t 000644 000765 000024 00000003331 12241403703 021711 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area04.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:A8' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area05.t 000644 000765 000024 00000003337 12241403703 021720 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area05.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:A1048576' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area06.t 000644 000765 000024 00000003331 12241403703 021713 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area06.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
$worksheet->print_area( 'A1:F9' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_area07.t 000644 000765 000024 00000003456 12241403703 021724 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_area07.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['new( $got_filename );
my $worksheet = $workbook->add_worksheet();
# The following print area is for the whole worksheet and should be ignored.
$worksheet->print_area( 'A1:XFD1048576' );
$worksheet->write( 'A1', 'Foo' );
$workbook->close();
###############################################################################
#
# Compare the generated and existing Excel files.
#
my ( $got, $expected, $caption ) = _compare_xlsx_files(
$got_filename,
$exp_filename,
$ignore_members,
$ignore_elements,
);
_is_deep_diff( $got, $expected, $caption );
###############################################################################
#
# Cleanup.
#
unlink $got_filename;
__END__
Excel-Writer-XLSX-0.76/t/regression/print_options01.t 000644 000765 000024 00000003333 12241403703 022473 0 ustar 00John staff 000000 000000 ###############################################################################
#
# Tests the output of Excel::Writer::XLSX against Excel generated files.
#
# reverse ('(c)'), January 2011, John McNamara, jmcnamara@cpan.org
#
use lib 't/lib';
use TestFunctions qw(_compare_xlsx_files _is_deep_diff);
use strict;
use warnings;
use Test::More tests => 1;
###############################################################################
#
# Tests setup.
#
my $filename = 'print_options01.xlsx';
my $dir = 't/regression/';
my $got_filename = $dir . "ewx_$filename";
my $exp_filename = $dir . 'xlsx_files/' . $filename;
my $ignore_members = [
qw(
xl/printerSettings/printerSettings1.bin
xl/worksheets/_rels/sheet1.xml.rels
)
];
my $ignore_elements = {
'[Content_Types].xml' => [' ['