File: drop-leto.patch

package info (click to toggle)
ruby-regexp-parser 2.11.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,092 kB
  • sloc: ruby: 6,891; makefile: 6; sh: 3
file content (149 lines) | stat: -rw-r--r-- 4,139 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Description: Drop usage of leto, it's not in the archive.
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Last-Update: 2026-02-08
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/spec/expression/clone_spec.rb
+++ b/spec/expression/clone_spec.rb
@@ -38,12 +38,12 @@ RSpec.describe('Expression::Base#clone')
     expect { root_2.clone }.not_to(change { root_2.quantifier.text.object_id })
   end
 
-  specify('Base#clone causes no shared state') do
-    root = RP.parse(regexp_with_all_features)
-    copy = root.clone
-    shared = Leto.shared_mutables(root, copy)
-    expect(shared).to be_empty, "found shared mutables:\n#{shared.join("\n")}"
-  end
+  #specify('Base#clone causes no shared state') do
+  #  root = RP.parse(regexp_with_all_features)
+  #  copy = root.clone
+  #  shared = Leto.shared_mutables(root, copy)
+  #  expect(shared).to be_empty, "found shared mutables:\n#{shared.join("\n")}"
+  #end
 
   specify('Subexpression#clone') do
     root = RP.parse(/^a(b([cde])f)g$/)
--- a/spec/expression/to_s_spec.rb
+++ /dev/null
@@ -1,109 +0,0 @@
-# frozen_string_literal: true
-
-require 'spec_helper'
-
-RSpec.describe('Expression::Base#to_s') do
-  def parse_frozen(pattern)
-    Leto.deep_freeze(RP.parse(pattern))
-  end
-
-  def expect_round_trip(pattern)
-    parsed = parse_frozen(pattern)
-
-    expect(parsed.to_s).to eql(pattern)
-  end
-
-  specify('literal alternation') do
-    expect_round_trip('abcd|ghij|klmn|pqur')
-  end
-
-  specify('quantified alternations') do
-    expect_round_trip('(?:a?[b]+(c){2}|d+[e]*(f)?)|(?:g+[h]?(i){2,3}|j*[k]{3,5}(l)?)')
-  end
-
-  specify('quantified sets') do
-    expect_round_trip('[abc]+|[^def]{3,6}')
-  end
-
-  specify('property sets') do
-    expect_round_trip('[\a\b\p{Lu}\P{Z}\c\d]+')
-  end
-
-  specify('groups') do
-    expect_round_trip("(a(?>b(?:c(?<n>d(?'N'e)??f)+g)*+h)*i)++")
-  end
-
-  specify('assertions') do
-    expect_round_trip('(a+(?=b+(?!c+(?<=d+(?<!e+)?f+)?g+)?h+)?i+)?')
-  end
-
-  specify('comments') do
-    expect_round_trip('(?#start)a(?#middle)b(?#end)')
-  end
-
-  specify('options') do
-    expect_round_trip('(?mix:start)a(?-mix:middle)b(?i-mx:end)')
-  end
-
-  specify('url') do
-    expect_round_trip('(^$)|(^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*' + '\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$)')
-  end
-
-  specify('multiline source') do
-    multiline = /
-          \A
-          a?      # One letter
-          b{2,5}  # Another one
-          [c-g]+  # A set
-          \z
-        /x
-
-    expect(parse_frozen(multiline).to_s).to eql(multiline.source)
-  end
-
-  specify('multiline #to_s') do
-    multiline = /
-          \A
-          a?      # One letter
-          b{2,5}  # Another one
-          [c-g]+  # A set
-          \z
-        /x
-
-    expect_round_trip(multiline.to_s)
-  end
-
-  specify('multiline with free space before quantifiers') do
-    multiline = /
-          \A
-          a   ?             # One letter
-          b {2,5}           # Another one
-          [c-g]  +          # A set
-          |                 #
-          [h-j]  +          (?# Extra test for Sequence#quantify )
-          \z
-        /x
-
-    expect_round_trip(multiline.to_s)
-  end
-
-  specify('regexp with all features') do
-    expect_round_trip(regexp_with_all_features.source)
-  end
-
-  # special case: implicit groups used for chained quantifiers produce no parens
-  specify 'chained quantifiers #to_s' do
-    pattern = /a+{1}{2}/
-    root = parse_frozen(pattern)
-    expect(root.to_s).to eql('a+{1}{2}')
-  end
-
-  # regression test for https://github.com/ammar/regexp_parser/issues/74
-  specify('non-ascii comment') do
-    pattern = '(?x) 😋 # 😋'
-    root = RP.parse(pattern)
-    expect(root.last).to be_a(Regexp::Expression::Comment)
-    expect(root.last.to_s).to eql('# 😋')
-    expect(root.to_s).to eql(pattern)
-  end
-end
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -2,7 +2,6 @@
 
 $VERBOSE = true
 
-require 'leto'
 require 'regexp_property_values'
 require_relative 'support/capturing_stderr'
 require_relative 'support/shared_examples'