Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix TestActArchive#test_act_zip #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions lib/qwik/act-archive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,18 @@ def test_act_zip
page.store '* ��'

page = @site.create_new
page.store '* A Presentation Page
page_contents = '* A Presentation Page
{{presen}}
* Header 2
'
mtime = {}
mtime[page.key] = page.mtime

sleep(1) # let mtime be odd value
page.store page_contents
contents = {}
contents[page.key] = page_contents

page = @site.create('PresenTest')
page.store '* A presentation test page'
mtime[page.key] = page.mtime
page_content = '* A presentation test page'
page.store page_content
contents[page.key] = page_content

res = session '/test/test.zip'
ok_title "Start."
Expand Down Expand Up @@ -307,9 +307,9 @@ def test_act_zip
Zip::ZipInputStream.open('testtemp.zip') {|zis|
while e = zis.get_next_entry
e_name = File.basename(e.name,'.txt')
if mtime.has_key? e_name
expected = mtime[e_name].to_i / 2 * 2
actual = e.time.to_i / 2 * 2
if contents.has_key? e_name
expected = contents[e_name]
actual = e.get_input_stream {|f| f.read }
ok_eq(expected, actual)
end
end
Expand Down