test-unit 3.4.1 → 3.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6a6de313462a0618acd2440bc3e639a59d616f6ff67d6d42cd301cdcbbdb2b6
4
- data.tar.gz: 59f68dc0e5c451d899f1cdd582c626e634a6b1fc7a45dde46312d33c6dd78104
3
+ metadata.gz: 4b0ea1c609f04e687f6b9c2bbc5d02efc79b1cf02516ddd36ff73a2cb974a2b0
4
+ data.tar.gz: 5110042334219485a6e99963685c6a51497509da5ec833516c0fa7a7a6eb0294
5
5
  SHA512:
6
- metadata.gz: 4c73428a30c84ed9949fe37c29d969c830f4ab8bd534a9b72da145e2347f0c4d621f6dc88385f0e181de66b4206c26cc355b6454174f6d2c34aa3cebc5e602dc
7
- data.tar.gz: 30cf3e15384e3a0b32f15bafbbadbd22aa22dbdb74d87449e89fb682da398aee6d46555c2a9b7a30360bdff33524734617d78dc018f97b37725903bae312c338
6
+ metadata.gz: 7201589c5975139093ac4618f696ba4f40448f9d4da7e2d437545d3f105563aed379d382ce57fe09ac5b27aa41af235019befaf2a8d96d5dcc6d6609cc13798e
7
+ data.tar.gz: e65b33f3f9560ad8581987617520b03ccdd63d59d5354546663fc0898209b3bbcebdc471c2afca5c2112897d34ad6d933f7ef416f2d6ccaad805f45b0a17a24b
data/doc/text/news.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # News
2
2
 
3
+ ## 3.4.2 - 2021-05-30 {#version-3-4-2}
4
+
5
+ ### Improvements
6
+
7
+ * [UI][console]: Improved diff readability for no color
8
+ case. Character based diff marks are always showed.
9
+
3
10
  ## 3.4.1 - 2021-04-19 {#version-3-4-1}
4
11
 
5
12
  ### Fixes
@@ -660,6 +660,7 @@ module Test
660
660
 
661
661
  def diff_line(from_line, to_line)
662
662
  to_operations = []
663
+ mark_operations = []
663
664
  from_line, to_line, _operations = line_operations(from_line, to_line)
664
665
 
665
666
  no_replace = true
@@ -689,11 +690,22 @@ module Test
689
690
  output_single(" " * (from_width - to_width))
690
691
  end
691
692
  end
693
+ mark_operations << Proc.new do
694
+ output_single("?" * from_width,
695
+ color("diff-difference-tag"))
696
+ if (to_width < from_width)
697
+ output_single(" " * (from_width - to_width))
698
+ end
699
+ end
692
700
  when :delete
693
701
  output_single(from_line[from_start...from_end],
694
702
  color("diff-deleted"))
695
703
  unless no_replace
696
704
  to_operations << Proc.new {output_single(" " * from_width)}
705
+ mark_operations << Proc.new do
706
+ output_single("-" * from_width,
707
+ color("diff-deleted"))
708
+ end
697
709
  end
698
710
  when :insert
699
711
  if no_replace
@@ -705,11 +717,16 @@ module Test
705
717
  output_single(to_line[to_start...to_end],
706
718
  color("diff-inserted"))
707
719
  end
720
+ mark_operations << Proc.new do
721
+ output_single("+" * to_width,
722
+ color("diff-inserted"))
723
+ end
708
724
  end
709
725
  when :equal
710
726
  output_single(from_line[from_start...from_end])
711
727
  unless no_replace
712
728
  to_operations << Proc.new {output_single(" " * to_width)}
729
+ mark_operations << Proc.new {output_single(" " * to_width)}
713
730
  end
714
731
  else
715
732
  raise "unknown tag: #{tag}"
@@ -725,6 +742,15 @@ module Test
725
742
  end
726
743
  output("")
727
744
  end
745
+
746
+ unless mark_operations.empty?
747
+ output_single("?", color("diff-difference-tag"))
748
+ output_single(" ")
749
+ mark_operations.each do |operation|
750
+ operation.call
751
+ end
752
+ output("")
753
+ end
728
754
  end
729
755
  end
730
756
  end
@@ -1,5 +1,5 @@
1
1
  module Test
2
2
  module Unit
3
- VERSION = "3.4.1"
3
+ VERSION = "3.4.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test-unit
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-19 00:00:00.000000000 Z
12
+ date: 2021-05-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: power_assert