summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorytjmt <[email protected]>2022-04-07 23:20:05 +0900
committerytjmt <[email protected]>2022-04-07 23:20:05 +0900
commitb6617ef71ef9980951f7eb30955ac73b7231e3a5 (patch)
tree1fa205edb4b3c30ec9fd56e5b4badc3773021a75 /test
parent09c8f3fdd5d62918d59951697107b3b58ad24fb2 (diff)
downloadcaxlsx-b6617ef71ef9980951f7eb30955ac73b7231e3a5.tar.gz
caxlsx-b6617ef71ef9980951f7eb30955ac73b7231e3a5.zip
Sort archive entries for correct MIME detection with file command
Diffstat (limited to 'test')
-rw-r--r--test/tc_package.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/tc_package.rb b/test/tc_package.rb
index b07f0d2f..6a943635 100644
--- a/test/tc_package.rb
+++ b/test/tc_package.rb
@@ -262,6 +262,10 @@ class TestPackage < Test::Unit::TestCase
#no mystery parts
assert_equal(25, p.size)
+ #sorted for correct MIME detection
+ assert_equal("[Content_Types].xml", p[0][:entry], "first entry should be `[Content_Types].xml`")
+ assert_equal("_rels/.rels", p[1][:entry], "second entry should be `_rels/.rels`")
+ assert_match(/\Axl\//, p[2][:entry], "third entry should begin with `xl/`")
end
def test_shared_strings_requires_part