summaryrefslogtreecommitdiff
path: root/spec
Commit message (Collapse)AuthorAgeFilesLines
* standardrb --only Standard/BlockSingleLineBraces --fixAustin Ziegler2022-07-041-1/+1
|
* standardrb --only Style/StringCharsAustin Ziegler2022-07-042-3/+3
|
* Clean up lint directivesAustin Ziegler2022-07-041-6/+2
|
* standardrb --only Layout/SpaceInsideHashLiteralBraces --fixAustin Ziegler2022-07-042-5/+5
|
* standardrb --only Style/ClassCheck --fixAustin Ziegler2022-07-041-1/+1
|
* Ignore Style/HashSyntaxAustin Ziegler2022-07-044-1/+7
|
* ignore Layout/heredocIndentation due to old RubyAustin Ziegler2022-07-041-0/+4
|
* standardrb --only Layout/ExtraSpacing --fix and ignoreAustin Ziegler2022-07-045-30/+40
|
* standardrb --only Style/PercentLiteralDelimiters --fixAustin Ziegler2022-07-045-48/+48
|
* standardrb --only Style/StringLiterals --fixAustin Ziegler2022-07-0411-550/+550
|
* Fix issues reported by fastererAustin Ziegler2022-07-041-3/+1
|
* Make tests a little quieter by removing a debug statementAustin Ziegler2021-12-231-1/+0
|
* Correct the expected difftiendo10112021-12-221-4/+4
| | | | | | | After fixing an off-by-one error at #75 Some tests are failed due to the reason specified at #77 After the discussion, we agree that we should fix it by changing the order of the expected diff
* Fix off-by-one errortiendo10112021-12-191-4/+2
| | | | | in ruby, (0..matches.size) will include both sides in the range, which means we'll get off-by-one error
* Use new interface for SimpleCov::Formatter::MultiFormatterKenichi Kamiya2021-02-211-1/+1
| | | | ref: https://github.com/simplecov-ruby/simplecov/commit/ddde04d4c9e2359ae7dcfdf27a247c61b238cb07
* # This is a combination of 9 commits.Austin Ziegler2020-07-0119-72/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # This is the 1st commit message: Fix improperly placed chunks Resolve #65 - Also add even more tests for checking `ldiff` results against `diff` results. - Fix issues with diff/ldiff output highlighted by the above tests. - Add a parameter to indicate that the hunk being processed is the _last_ hunk; this results in correct counting of the hunk size. - The misplaced chunks were happening because of an improper `.abs` on `#diff_size`, when the `.abs` needed to be on the finding of the maximum diff size. # This is the commit message #2: Ooops. Debugger # This is the commit message #3: Restore missing test - Fix some more format issues raised by the missing test. - Start fixing Rubocop formatting. # This is the commit message #4: Last RuboCop fixes # This is the commit message #5: Finalize diff-lcs 1.4 # This is the commit message #6: Fix #44 The problem here was the precedence of `or` vs `||`. Switching to `||` resulted in the expected behaviour. # This is the commit message #7: Resolve #43 # This is the commit message #8: Typo # This is the commit message #9: Resolve #35 with a comment
* Fix some issues with 1.4 on older Rubiesfix-ruby-1.8-supportAustin Ziegler2020-06-282-7/+15
| | | | | - Required to fully support rspec. - Resolves #63.
* Fix filename substitutionAustin Ziegler2020-06-231-7/+8
|
* Test fix for timestamp issueAustin Ziegler2020-06-231-2/+2
|
* Change when max_diff_size is appliedAustin Ziegler2020-06-235-2/+54
| | | | | | | - This appears to satisfy the issues found in #60 as well as providing the additional fixes required to properly test ldiff. Resolves #60
* Fix windows test failuresAustin Ziegler2020-06-231-6/+8
|
* Fix an issue with negative hunk max_sizeAustin Ziegler2020-06-231-0/+10
| | | | | | | Resolves #57. - The `diff_size` should be an absolute value. - Added a test to ensure that the issue does not introduce a regression.
* Finalize 1.4 releaseAustin Ziegler2020-06-221-4/+1
| | | | | | | | - Use GitHub Actions - Exclude windows code from non-windows tests - Exclude unsupported windows tests and allow windows failures for now because of line-ending differences - Remove Travis configuration
* Resolve multiple issues for 1.4Austin Ziegler2019-02-0410-39/+116
| | | | | | | | | | | | | - Resolve ldiff output issues: Resolves #5 and #6 by adding system-output comparison calls to `bin/ldiff` compared against some pre-generated output. There is some timestamp manipulation involved with the output comparison, as the timestamps are unstable because of the way that git clone works. - Resolved a problem with bin/ldiff --context output. - Resolved a Numeric/Integer OptParse issue: later versions of Ruby had problems working with an `OptParse` option specification of `Numeric`; this has been changed to `Integer`.
* Reintroduce Diff::LCS::Change#to_aryAustin Ziegler2019-02-011-0/+24
| | | | | | | | | | | - This required some level of code remediation in the main library, but all tests now pass: - Patchsets are now internally flattened one level explicitly, rather than using Array#flatten. This ensures that only the outer patchset array is flattened. Fixes #48.
* Applied Rubocop rules that I likeAustin Ziegler2019-01-2711-509/+542
| | | | | - Other linting configuration also applied. - Soft-deprecating versions older than 2.3.
* Revert PR#47 "Add #to_ary to Diff::LCS::Changeā€¦"Austin Ziegler2019-01-271-24/+0
| | | | | | | | | | This reverts commits 01e0cae and 3b4d2be because they introduce fatally breaking changes in the tests that were hidden by broken CI. * 01e0cae: Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange [Akinori MUSHA] * 3b4d2be: Mention in rdoc that Diff::LCS::ContextChange can be converted to an array [Akinori MUSHA]
* Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChangeAkinori MUSHA2019-01-261-0/+24
| | | | | | | | | | | | | | | | | It would be quite handy if you could write as follows: ```ruby Diff::LCS.sdiff(a, b).each do |action, (old_position, old_element), (new_position, new_element)| case action when '!' # replace when '-' # delete when '+' # insert end end ```
* diff-lcs 1.3Austin Ziegler2017-01-1812-274/+457
| | | | | | | | | | | - Updated testing and gem infrastructure. - Cleaning up documentation. - Modernizing specs. - Silence Ruby 2.4 Fixnum deprecation warnings. Fixes #36, #38. - Ensure test dependencies are loaded. Fixes #33, #34 so that specs can be run independently. - Fix issue #1 with incorrect intuition of patch direction. Tentative fix, but the failure cases pass now.
* Fixing Coveralls for testing.Austin Ziegler2017-01-111-27/+21
|
* Enabling code coverage.Austin Ziegler2014-04-261-0/+37
|
* Release 1.25: Bugfix for pull request #23.Austin Ziegler2013-11-071-0/+12
|
* Fix pruning of common sequences at start.Paul Kunysch2013-04-201-0/+6
|
* fix indentation of examplesJon Rowe2013-04-111-32/+27
|
* protect against no dataJon Rowe2013-04-111-0/+14
|
* Finalizing encoding-aware diff fixes.Austin Ziegler2013-03-301-10/+14
| | | | | | | | | | | | | | * Diff::LCS::Hunk could not properly generate a difference for comparison sets that are not US-ASCII-compatible because of the use of literal regular expressions and strings. Jon Rowe (JonRowe) found this in rspec/rspec-expectations#219 and provided a first pass implementation in diff-lcs#15. I've reworked it because of test failures in Rubinius when running in Ruby 1.9 mode. This coerces the added values to the encoding of the old dataset (as determined by the first piece of the old dataset). https://github.com/rspec/rspec-expectations/issues/219 https://github.com/halostatue/diff-lcs/pull/15 * Adding Travis CI testing for Ruby 2.0.
* wrap tests in 187 protection tooJon Rowe2013-03-151-20/+22
|
* fix issues with encoding caused by using literalsJon Rowe2013-03-151-0/+57
|
* Fixing a left-in debugging statement.Austin Ziegler2013-01-201-1/+0
|
* Fixed Issue #1 patch direction detection.Austin Ziegler2013-01-202-13/+17
| | | | | This bug has been filed for five and a half years and I have finally fixed it. By ghu it feels good.
* Cleaning up unnecessary comments.Austin Ziegler2013-01-199-20/+0
|
* Starting on a substantial refactoring to fix bugs.Austin Ziegler2012-03-242-5/+5
| | | | | | | | | | | | | | | 1. All Diff::LCS::__* methods are now moved to Diff::LCS::Internals and named without the underscores. 2. Fixed the documentation for Diff::LCS::patch. (Some formatting may have been broken.) 3. Eliminated normalize_patchset in favour of the (substantially similar) analyze_patchset. This allows for a single-pass over a patchset to determine whether the patchset contains changes and transform it to the object-based format. 4. Made Diff::LCS::ContextChange descend from Diff::LCS::Change. This will probably change so that both descend from something like a Diff::LCS::AbstractChange because of some issues that may arise with case statement order.
* Major investigation to Diff::LCS bugs.Austin Ziegler2012-03-218-92/+260
| | | | | | | | | | | | | | | - Fixed some formatting and style issues. - Trailing spaces - Calling class methods using '.' instead of '::'. - Resolved Issue #2 by handling string[string.size, 1] properly (it returns "" not nil). - Added special case handling for Diff::LCS.patch so that it handles patches that are empty or contain no changes. - Adding temporary code to help determined the reason for the misidentification of patch direction. - Added a number of different specs to check for comparing the same value. - Added broken spec filtering.
* Fix+specs for Diff::LCS::ChangeTypeTests predicatesMichael Granger2012-01-241-0/+70
|
* Aliasing shared example code for better readingAustin Ziegler2011-08-014-56/+57
|
* Fixing an error in helper balanced_reverse sortingAustin Ziegler2011-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Found with rbx-head, Array#sort_by isn't a stable sort in rbx but appears to be in most other Rubies. Thus the array [ [ '-', 1, 1 ], [ '-', 1, 2 ], [ '-', 2, 2 ] ] would be sorted properly with the code #sort_by { |line| line[1] } on most Rubies, but rbx might sort it as [ [ '-', 1, 2 ], [ '-', 1, 1 ], [ '-', 2, 2 ] ] Changing the sort to #sort_by { |line| [ line[1], line[2] ] } fixes this.
* Cleaning up the specs.Austin Ziegler2011-07-318-345/+331
|
* Expanding rspec tests to reflect reality.Austin Ziegler2011-07-312-94/+226
| | | | | | | There's a lot more testing that was happening in the code than was being reported. Now many of the special cases that were hidden by the transforms for balanced traversal (reverse, change/no change) have been made into individual tests with the use of shared example groups.
* Convert to RSpecAustin Ziegler2011-07-317-0/+1199