cqfn / pdd

Command line toolkit for collecting TODO markers from your code, known as Puzzle Driven Development (PDD)
https://www.0pdd.com
MIT License
76 stars 25 forks source link

[#211] support more puzzle test cases #212

Closed mbao01 closed 2 years ago

mbao01 commented 2 years ago

@yegor256 please review

codecov[bot] commented 2 years ago

Codecov Report

Merging #212 (763c1c9) into master (82813fd) will decrease coverage by 0.31%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
- Coverage   95.83%   95.51%   -0.32%     
==========================================
  Files          10       10              
  Lines         360      357       -3     
==========================================
- Hits          345      341       -4     
- Misses         15       16       +1     
Impacted Files Coverage Δ
lib/pdd/source.rb 99.17% <100.00%> (-0.02%) :arrow_down:
lib/pdd.rb 96.34% <0.00%> (-1.22%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 82813fd...763c1c9. Read the comment docs.

yegor256 commented 2 years ago

@mbao01 if it fixed the problem, rename the files in test_assets/puzzles directory so that their files names are not broken-* anymore. If after renaming the build is green -- we will know that the problem is fixed.

mbao01 commented 2 years ago

@yegor256 I made the update. Please review again. Thanks

yegor256 commented 2 years ago

@rultor merge

rultor commented 2 years ago

@rultor merge

@yegor256 OK, I'll try to merge now. You can check the progress of the merge here

rultor commented 2 years ago

@rultor merge

@mbao01 @yegor256 Oops, I failed. You can see the full log here (spent 53s)


  gem 'cucumber', '~> 1.3.20'

With aruba >= 1.0 there will be breaking changes. Make sure to read https://github.com/cucumber/aruba/blob/master/History.md for 1.0.0
Post-install message from ruby-filemagic:

ruby-filemagic-0.7.3 [2022-01-07]:

* Dockerfile to build native extension (pull request #26 by Pavel Lobashov).
* Include paths for ARM-based Apple Macs (Apple Silicon) (pull request #35 by
  @545ch4).

+ LC_ALL=US-ASCII
+ bundle exec rake
WARNING: consider using an array rather than a space-delimited string with cucumber_opts to avoid undesired behavior.
Run options: --seed 23157

# Running:

\u001b[31mERROR\u001b[0m: Puzzle a.txt:1-1 has an estimate of 0 minutes, which is lower than 30 minutes
\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m/home/r/repo/lib/pdd/source.rb:233: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/usr/local/rvm/gems/ruby-2.7.0/gems/minitest-5.16.2/lib/minitest/mock.rb:297: warning: The called method is defined here
\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m1-04e35eb3: "How are you?"
44-660e9d6f: "This puzzle consists of two paragraphs"
71-8097fa26: "This puzzle consists of just one paragraph"
132-bc1dfafe: "Just a few lines before another comment"
1425-59819ae3: "Continue replacing usage of MatcherAssert.assertThat with Assertion from cactoos-matchers. Keep PR short and limit the changes to single package. Update this puzzle for the next package. After all packages are done, add MatcherAssert to forbidden-apis.txt"
42-95d34073: "This is a very long puzzle of many lines and not always Unicode symbols like this привет!"
55-947a180a: "This is the puzzle; Indented this way."
\u001b[31mE\u001b[0m

\u001b[31mError:
TestMany#test_parsing:
PDD::Error: hey:2 invalid byte sequence in US-ASCII
    /home/r/repo/lib/pdd/source.rb:79:in `rescue in block in puzzles'
    /home/r/repo/lib/pdd/source.rb:73:in `block in puzzles'
    /home/r/repo/lib/pdd/source.rb:72:in `each'
    /home/r/repo/lib/pdd/source.rb:72:in `each_with_index'
    /home/r/repo/lib/pdd/source.rb:72:in `puzzles'
    /home/r/repo/test/test_many.rb:34:in `block in test_parsing'
    /home/r/repo/test/test_many.rb:32:in `each'
    /home/r/repo/test/test_many.rb:32:in `test_parsing'
\u001b[0m

rails test home/r/repo/test/test_many.rb:31

\u001b[32m.\u001b[0m\u001b[32m.\u001b[0m

Finished in 1.220076s, 41.8007 runs/s, 109.8293 assertions/s.
51 runs, 134 assertions, 0 failures, 1 errors, 0 skips
Coverage report generated for Unit Tests to /home/r/repo/coverage. 341 / 357 LOC (95.52%) covered.
rake aborted!
Command failed with status (1)
/usr/local/rvm/gems/ruby-2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `eval'
/usr/local/rvm/gems/ruby-2.7.0/bin/ruby_executable_hooks:24:in `<main>'
Tasks: TOP => default => test
(See full trace by running task with --trace)
container 05d4e1f39b956a719ffb762dd08bec3ea4215384c557db0ed45ce3b0e73c6273 is dead
Mon 01 Aug 2022 02:52:30 PM CEST