/spec/known_issues.rb

https://github.com/eugen0329/vim-esearch · Ruby · 71 lines · 33 code · 9 blank · 29 comment · 0 complexity · 17e731ff901afb09d2cdc592f3644df4 MD5 · raw file

  1. # frozen_string_literal: true
  2. require 'support/known_issues'
  3. # Match examples by user defined metadata and mark it with skip or pending:
  4. # https://relishapp.com/rspec/rspec-core/docs/metadata/user-defined-metadata
  5. # The same approach is used in other repos (ex. JRuby) to avoid overcrowding
  6. # example bodies with inline if-condition-then-pending and to keep all the
  7. # pending examples info in one place. In addition, only exceptions matching
  8. # exception_pattern are handled to avoid false positives.
  9. #
  10. # Usage:
  11. # pending! description_substring, exception_pattern, **other_metadata
  12. # skip! description_substring, **other_metadata
  13. # random_failure! description_substring, exception_pattern, **other_metadata
  14. #
  15. # #skip! and pending! follow RSpec semantics
  16. # #random_failure! works like pending, but won't fail if an example is succeeded
  17. KnownIssues.allow_tests_to_fail_matching_by_metadata do
  18. # Aren't implemented by grep
  19. pending! '[[:digit:]]', /position_inside_file/, adapter: :grep, matching: :regexp
  20. pending! '\d{2}', /position_inside_file/, adapter: :grep, matching: :regexp
  21. pending! 'a{2}', /position_inside_file/, adapter: :grep, matching: :regexp
  22. pending! '/(?:', /position_inside_file/, adapter: :grep, matching: :regexp
  23. pending! '/(?<=', /position_inside_file/, adapter: :grep, matching: :regexp
  24. pending! '(?<name>', /position_inside_file/, adapter: :grep, matching: :regexp
  25. pending! '(?P<name>', /position_inside_file/, adapter: :grep, matching: :regexp
  26. # Aren't implemented by git-grep
  27. pending! '[[:digit:]]{2}', /position_inside_file/, adapter: :git, matching: :regexp
  28. pending! '\d{2}', /position_inside_file/, adapter: :git, matching: :regexp
  29. pending! 'a{2}', /position_inside_file/, adapter: :git, matching: :regexp
  30. pending! '/(?:', /position_inside_file/, adapter: :git, matching: :regexp
  31. pending! '/(?<=', /position_inside_file/, adapter: :git, matching: :regexp
  32. pending! '/(?<name>', /position_inside_file/, adapter: :git, matching: :regexp
  33. pending! '(?P<name>', /position_inside_file/, adapter: :git, matching: :regexp
  34. # https://github.com/google/re2/wiki/Syntax
  35. pending! '/(?<name>', /reported_errors/, adapter: :pt, matching: :regexp
  36. # TODO: output should handle status codes from adapters
  37. pending! '/(?<=', /reported_errors/, adapter: :pt, matching: :regexp
  38. # TODO: implement support for later versions with --pcre2
  39. # https://github.com/BurntSushi/ripgrep/blob/master/CHANGELOG.md
  40. pending! '/(?<=', /reported_errors/, adapter: :rg, matching: :regexp
  41. pending! '/(?<name>', /reported_errors/, adapter: :rg, matching: :regexp
  42. # TODO: investigate
  43. skip! '/3\d+5/', adapter: :git, matching: :regexp
  44. skip! '/3\d*5/', adapter: :git, matching: :regexp
  45. skip! '/3\d+5/', adapter: :grep, matching: :regexp
  46. skip! '/3\d*5/', adapter: :grep, matching: :regexp
  47. # Git have different way to escape globs:
  48. # `ag *.txt`, `ag \*.txt` - a wildcard and a regular string
  49. # `git grep *.txt`, `git grep \*.txt` - both metachars
  50. pending! 'globbing escaped *', /expected to have results.*got.*\[.+\]/m, adapter: :git
  51. # Ack cannot work with files named ~
  52. pending! 'searching in a file with name "~"', /MissingEntry/, adapter: :ack
  53. pending! 'searching in a file with name "-"', /MissingEntry/, adapter: :ack
  54. # Can be fixed by storing data as a single string instead of list of lines.
  55. # Can reduce freezes on stdout callbacks, but seems too hard to implement for
  56. # now.
  57. skip! 'searching in a file with name "a\\n"', adapter: :ag
  58. skip! 'searching in a file with name "a\\n"', adapter: :ack
  59. skip! 'searching in a file with name "a\\n"', adapter: :pt
  60. skip! 'searching in a file with name "a\\n"', adapter: :rg
  61. skip! 'searching in a file with name "a\\n"', adapter: :grep
  62. end