diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-10-29 11:52:16 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-10-29 11:52:16 -0400 |
commit | ab2267eb083a301e120d6912e64b40eebf82666c (patch) | |
tree | 39647034a696246115888465f2017e847fb1a5bc /t/lib | |
parent | 97305c7459993e61192b64628b601635a85dd9fc (diff) | |
download | catalyst-view-spreadsheet-template-ab2267eb083a301e120d6912e64b40eebf82666c.tar.gz catalyst-view-spreadsheet-template-ab2267eb083a301e120d6912e64b40eebf82666c.zip |
decode template files as utf8
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/MyUTF8App.pm | 13 | ||||
-rw-r--r-- | t/lib/MyUTF8App/Controller/Root.pm | 15 | ||||
-rw-r--r-- | t/lib/MyUTF8App/View/Spreadsheet/Template.pm | 9 | ||||
-rw-r--r-- | t/lib/MyUTF8App/root/index.json | 151 |
4 files changed, 188 insertions, 0 deletions
diff --git a/t/lib/MyUTF8App.pm b/t/lib/MyUTF8App.pm new file mode 100644 index 0000000..f5c68e4 --- /dev/null +++ b/t/lib/MyUTF8App.pm @@ -0,0 +1,13 @@ +package MyUTF8App; +use Moose; +use namespace::autoclean; + +extends 'Catalyst'; + +__PACKAGE__->config( + name => 'MyUTF8App', +); + +__PACKAGE__->setup; + +1; diff --git a/t/lib/MyUTF8App/Controller/Root.pm b/t/lib/MyUTF8App/Controller/Root.pm new file mode 100644 index 0000000..c848f06 --- /dev/null +++ b/t/lib/MyUTF8App/Controller/Root.pm @@ -0,0 +1,15 @@ +package MyUTF8App::Controller::Root; +use Moose; +use namespace::autoclean; + +BEGIN { extends 'Catalyst::Controller' } + +__PACKAGE__->config(namespace => ''); + +sub index :Path :Args(0) {} + +sub end : ActionClass('RenderView') {} + +__PACKAGE__->meta->make_immutable; + +1; diff --git a/t/lib/MyUTF8App/View/Spreadsheet/Template.pm b/t/lib/MyUTF8App/View/Spreadsheet/Template.pm new file mode 100644 index 0000000..d1ea7f7 --- /dev/null +++ b/t/lib/MyUTF8App/View/Spreadsheet/Template.pm @@ -0,0 +1,9 @@ +package MyUTF8App::View::Spreadsheet::Template; +use Moose; +use namespace::autoclean; + +extends 'Catalyst::View::Spreadsheet::Template'; + +__PACKAGE__->meta->make_immutable; + +1; diff --git a/t/lib/MyUTF8App/root/index.json b/t/lib/MyUTF8App/root/index.json new file mode 100644 index 0000000..f127933 --- /dev/null +++ b/t/lib/MyUTF8App/root/index.json @@ -0,0 +1,151 @@ +{ + "selection" : 0, + "worksheets" : [ + { + "cells" : [ + [ + { + "contents" : "Colored Cell", + "format" : { + "bg_color" : "#9BBB59", + "color" : "#FFFF00", + "pattern" : "solid", + "size" : 12 + }, + "type" : "string" + }, + { + "contents" : "Wide Cell (25.00)", + "type" : "string" + }, + { + "contents" : "Bordered Cell w/ Text Wrap", + "format" : { + "border" : [ + "thin", + "thin", + "thin", + "thin" + ], + "border_color" : [ + "#000000", + "#000000", + "#000000", + "#000000" + ], + "text_wrap" : true + }, + "type" : "string" + }, + { + "contents" : "Middle Valigned", + "format" : { + "valign" : "vcenter" + }, + "type" : "string" + }, + { + "contents" : "Right Aligned and text wrapped", + "format" : { + "align" : "right", + "text_wrap" : true + }, + "type" : "string" + } + ], + [ + {}, + {}, + {}, + {}, + {} + ], + [ + { + "contents" : 10, + "type" : "number" + }, + {}, + {}, + {}, + {} + ], + [ + { + "contents" : 20, + "type" : "number" + }, + {}, + {}, + { + "contents" : 2.5, + "format" : { + "num_format" : "\"¥\"#,##0.00" + }, + "type" : "number" + }, + { + "contents" : "« currency cell", + "format" : { + "align" : "center", + "color" : "#4BACC6", + "size" : 12 + }, + "type" : "string" + } + ], + [ + { + "contents" : 30, + "type" : "number" + }, + {}, + {}, + {}, + {} + ], + [ + { + "contents" : 60, + "formula" : "SUM(A3:A5)", + "type" : "number" + }, + { + "contents" : "« formula cell", + "format" : { + "align" : "right", + "bg_color" : "#EEECE1", + "color" : "#F79646", + "pattern" : "solid", + "size" : 12 + }, + "type" : "string" + }, + {}, + {}, + {} + ] + ], + "column_widths" : [ + 10.83203125, + 25.83203125, + 10, + 15, + 18.1640625 + ], + "name" : "Sheet1", + "row_heights" : [ + 45, + 15, + 15, + 15, + 15, + 15 + ], + "selection" : [ + 3, + 4 + ] + } + ] +} |