<commit_before>require 'spec_helper'

## Version specfiic tests
#
## Since 13.3.1. See IMAGE-437
#
# Platform regression. /etc/issue should not exist
# See IMAGE-433
#
# This test should run for versions > 13.3.0. 1331 == 13.3.1
if attr[:base_version].delete('.').to_i >= 1331
	describe command('ls /etc/issue') do
		its(:stderr) { should match /No such file or directory/ }
	end
end


## Since 13.3.0. See IMAGE-404
# FIXME
# Need to inteligently test for pkgsrc version based on attribute
# e.g. 13.3.x should translate to 2013Q3


# Is this really 2013Q3?
describe file('/opt/local/etc/pkgin/repositories.conf') do
  it { should be_file }
  it { should contain "2013Q3" }
end

# See DATASET-937
# datasets should ship with /etc/ipadm/ipadm.conf
describe file('/etc/ipadm/ipadm.conf') do
  it { should be_file }
end

# Refactored SMF support; the likely only visible change is a different layout of SMF files on disk (see /opt/local/lib/svc)
describe file('/opt/local/lib/svc') do
  it { should be_directory }
end

# See DATASET-818<commit_msg>removed test for package version. Not really needed, can always revisit later<commit_after>require 'spec_helper'

## Version specfiic tests
#
## Since 13.3.1. See IMAGE-437
#
# Platform regression. /etc/issue should not exist
# See IMAGE-433
#
# This test should run for versions > 13.3.0. 1331 == 13.3.1
if attr[:base_version].delete('.').to_i >= 1331
	describe command('ls /etc/issue') do
		its(:stderr) { should match /No such file or directory/ }
	end
end


## Since 13.3.0. See IMAGE-404
#
# See DATASET-937
# datasets should ship with /etc/ipadm/ipadm.conf
describe file('/etc/ipadm/ipadm.conf') do
  it { should be_file }
end

# Refactored SMF support; the likely only visible change is a different layout of SMF files on disk (see /opt/local/lib/svc)
describe file('/opt/local/lib/svc') do
  it { should be_directory }
end

# See DATASET-818
{'fraction_non_alphanumeric': 0.11926121372031662, 'fraction_numerical': 0.050659630606860157, 'mean_word_length': 3.7281795511221945, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '1664405', 'n_tokens_mistral': 731, 'n_tokens_neox': 649, 'n_words': 220}