<commit_before>require 'db/sqlite3'
require 'schema_dump'

class SQLite3SchemaDumpTest < Test::Unit::TestCase
  include SchemaDumpTestMethods

  def test_excludes_sqlite_sequence
    output = standard_dump
    assert_no_match %r{create_table "sqlite_sequence"}, output
  end

  def test_dumping_with_dot_in_table_name
    connection.create_table('test.some_records') { |t| t.string :name }
    connection.add_index('test.some_records', :name, :unique => true)
    assert_equal 2, connection.columns('test.some_records').size
    assert_equal 1, connection.indexes('test.some_records').size
    begin
      output = standard_dump
      assert_match %r{create_table "test.some_records"}, output
      assert_match %r{test.some_records_on_name}, output   # index line
    ensure
      ActiveRecord::Base.connection.drop_table('test.some_records')
    end
  end

end<commit_msg>[test] skip a SQLite3 test that is already skipped on master<commit_after>require 'db/sqlite3'
require 'schema_dump'

class SQLite3SchemaDumpTest < Test::Unit::TestCase
  include SchemaDumpTestMethods

  def test_excludes_sqlite_sequence
    output = standard_dump
    assert_no_match %r{create_table "sqlite_sequence"}, output
  end

  def test_dumping_with_dot_in_table_name
    pend 'in recent Rails version, a.b means database table "b" in database "a". Delete test?'

    connection.create_table('test.some_records') { |t| t.string :name }
    connection.add_index('test.some_records', :name, :unique => true)
    assert_equal 2, connection.columns('test.some_records').size
    assert_equal 1, connection.indexes('test.some_records').size
    begin
      output = standard_dump
      assert_match %r{create_table "test.some_records"}, output
      assert_match %r{test.some_records_on_name}, output   # index line
    ensure
      ActiveRecord::Base.connection.drop_table('test.some_records')
    end
  end

end
{'fraction_non_alphanumeric': 0.09413008989952407, 'fraction_numerical': 0.004759386567953464, 'mean_word_length': 4.681681681681682, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4993846', 'n_tokens_mistral': 599, 'n_tokens_neox': 583, 'n_words': 126}