yusukebe/App-revealup — pull request #6 by nanis (2014-12-18 15:52:20+00:00)
Title: Fix unwanted EOL conversion on Windows

On Windows, reading a file in text mode causes CRLF sequences
to be converted to LF. Most of the time, This does not matter
for things like CSS or HTML or JavaScript source files, but if
you try to include an image file in your presentation with a
sequence of 0x0d 0x0a bytes anywhere, those will be replaced
with a single 0x0a if you use Path::Tiny->slurp.

This commit does the following:

- In App::revealup::util::path_to_res, replace slurp with slurp_raw.

- In t/cli.t, locally change directory to the test subdirectory so
the test server instance can serve files from the test subdirectory.

- Add a single pixel Windows BMP file where color index 8 is #C00A0D
so that the byte sequence 0x0d 0x0a appears in the file.

- Extend the client subtest in t/cli.t to retrieve this file via HTTP,
check its content type, and length, and compare the received octets
with the contents of the file on disk.

See also [my blog post](http://blog.nu42.com/2014/12/when-bits-dont-stick.html).