mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
7608275089
Thor compares the new contents with the existing file by using File.binread(destination) == new_content. File.binread returns a string with ASCII_8BIT encoding, which will not match the new_content if new_content contains multi-byte utf-8. This patch simply encodes the new_content to ASCII_8BIT before passing it to Thor.
13 lines
512 B
Gherkin
13 lines
512 B
Gherkin
Feature: Unicode filecontents
|
|
In order to support non-ASCII characters in file contents
|
|
|
|
Scenario: Rebuild with files containing unicode characters in their name
|
|
Given a fixture app "clean-app"
|
|
And a file named "source/index.html.erb" with:
|
|
"""
|
|
你好
|
|
"""
|
|
And a successfully built app at "clean-app"
|
|
And a modification time for a file named "build/index.html"
|
|
And a successfully built app at "clean-app"
|
|
Then the file "build/index.html" should not have been updated
|