<commit_before>require 'spec_helper'
require 'ostruct'

describe "has_query_params?" do

  before(:all) do
    class TestForSpecSupport < String
      include SpecSupport::QueryParams
    end
  end

  it "does not have empty key-value pair" do
    t = TestForSpecSupport.new("key=value")
    t.has_query_params?(nil,nil).should be_false
  end

  it "has simple key-value pair" do
    t = TestForSpecSupport.new("key=value")
    t.has_query_params?("key", "value").should be_true
  end

  it "does not match subpart of value" do
    t = TestForSpecSupport.new("key=values")
    t.has_query_params?("key", "value").should be_false
  end

  it "does not match subpart of key" do
    t = TestForSpecSupport.new("skey=value")
    t.has_query_params?("key", "value").should be_false
  end

end<commit_msg>Subparts delimited by &<commit_after>require 'spec_helper'
require 'ostruct'

describe "has_query_params?" do

  before(:all) do
    class TestForSpecSupport < String
      include SpecSupport::QueryParams
    end
  end

  it "does not have empty key-value pair" do
    t = TestForSpecSupport.new("key=value")
    t.has_query_params?(nil,nil).should be_false
  end

  it "has simple key-value pair" do
    t = TestForSpecSupport.new("key=value")
    t.has_query_params?("key", "value").should be_true
  end

  it "does not match subpart of value" do
    t = TestForSpecSupport.new("key=values")
    t.has_query_params?("key", "value").should be_false
  end

  it "does not match subpart of key" do
    t = TestForSpecSupport.new("skey=value")
    t.has_query_params?("key", "value").should be_false
  end

  it "does not match subpart of value delimited by &" do
    t = TestForSpecSupport.new("key=values&")
    t.has_query_params?("key", "value").should be_false
  end

  it "does match value delimited by &" do
    t = TestForSpecSupport.new("key=value&a=b")
    t.has_query_params?("key", "value").should be_true
  end

  it "does not match subpart of key delimited by &" do
    t = TestForSpecSupport.new("&skey=values")
    t.has_query_params?("key", "value").should be_false
  end

  it "does match key delimited by &" do
    t = TestForSpecSupport.new("a=b&key=value")
    t.has_query_params?("key", "value").should be_true
  end

end
{'fraction_non_alphanumeric': 0.11914323962516733, 'fraction_numerical': 0.0, 'mean_word_length': 3.9166666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5492966', 'n_tokens_mistral': 784, 'n_tokens_neox': 764, 'n_words': 200}