Skip to content

Commit

Permalink
#37 added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Yegor Bugayenko committed May 4, 2015
1 parent 0100d4f commit 01b0375
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion features/step_definitions/steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
File.open(file, 'w') do |f|
f.write(text.gsub(/\\x00/, "\x00"))
f.write(text.gsub(/\\xFF/, "\xFF"))
end
end

Expand Down
6 changes: 4 additions & 2 deletions features/unicode.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ Feature: Unicode
Scenario: Skip file with broken Unicode
Given I have a "test.txt" file with content:
"""
# @todo #44 \x00 hey
\xFF test
# @todo #44 \xFF hey
\xFF test again
"""
When I run bin/pdd with "--exclude=test.txt --v -f=/dev/null"
Then Exit code is zero
Then Stdout contains "excluding test.txt"
Then Exit code is zero
1 change: 1 addition & 0 deletions lib/pdd/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def initialize(file, path)

# Fetch all puzzles.
def puzzles
PDD.log.info "reading #{@path}..."
re = /(.*(?:^|\s))@todo\s+#([\w\-\.:\/]+)\s+(.+)/
puzzles = []
lines = File.readlines(@file)
Expand Down

0 comments on commit 01b0375

Please sign in to comment.