1968N/A# The contents of this file are subject to the terms of the 1968N/A# Common Development and Distribution License (the "License"). 1968N/A# You may not use this file except in compliance with the License. 1968N/A# See the License for the specific language governing permissions 1968N/A# and limitations under the License. 1968N/A# When distributing Covered Code, include this CDDL HEADER in each 1968N/A# If applicable, add the following below this CDDL HEADER, with the 1968N/A# fields enclosed by brackets "[]" replaced with your own identifying 1968N/A# information: Portions Copyright [yyyy] [name of copyright owner] 3339N/A# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved. 1968N/A# The Thai word for package. 1968N/A """Class to test the functionality of the pkg.config Property classes. 1968N/A # 'glist' contains the list of good values to try. 1968N/A # 'blist' contains the list of bad values to try. 1968N/A # This ensures that both __eq__ and __ne__ are tested 1968N/A # This ensures that both __eq__ and __ne__ are tested 1968N/A # Verify that the stringified form of the property's 1968N/A # value matches what is expected. 3339N/A # str() call in Python 3 must return str (unicode). 1968N/A # Verify that a property value's stringified form 1968N/A # provides can be parsed into an exact equivalent 1968N/A # in native form (e.g. list -> string -> list). 1968N/A """Verify base property functionality works as expected.""" 1968N/A # Verify invalid names aren't permitted. 1968N/A for n
in (
"contains\na new line",
"contains\ttab",
1968N/A "contains\fform feed",
"contains\vvertical tab",
1968N/A # Verify spaces are permitted. 1968N/A # Verify property objects are sorted by name and that other 1968N/A # objects are sorted after. 1968N/A [
"a",
"b",
"c",
"d",
"e",
"f",
"g"]
1968N/A # Verify equality is always False when comparing a property 1968N/A # object to a different object and that objects that are not 1968N/A # properties don't cause a traceback. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A glist = [(
None,
""), (
"",
""), (
"foo",
"foo"), (
123,
"123"),
1968N/A {},
# Expect strings; not objects. 1968N/A (
None,
""),
# None should become "". 1968N/A (
"",
""),
# "" should equal "". 1968N/A (
"foo",
"foo"),
# simple strings should match. 1968N/A (
123,
"123"),
# int should become str. 1968N/A (
"\xfe",
"\xfe")
# Passthrough of 8-bit data. 1968N/A # (That is not valid UTF-8.) 1968N/A {},
# Other data types or objects not expected. 1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"def",
""), (
"def",
None)),
1968N/A ((
"def",
"bob cat"), (
"def",
"bob cat")),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"def",
"bob cat"), (
"str2",
"bob cat")),
1968N/A ((
"def",
"lynx"), (
"str2",
"bob cat")),
1968N/A # Verify base stringify works as expected. 1968N/A # Verify base copy works as expected. 1968N/A """Verify boolean properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A # Not equal because property names and/or values do not 1968N/A """Verify defined properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify allowed value functionality permits expected values. 1968N/A # Verify allowed value functionality denies unexpected values. 1968N/A """Verify integer properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"int",
"16384"), (
"int",
16384)),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"int",
256), (
"int2",
256)),
1968N/A ((
"int",
0), (
"int",
256)),
2348N/A # Verify minimum works as expected. 2348N/A # Verify maximum works as expected. 2348N/A # Verify maximum and minimum work together. 2348N/A # Verify maximum and minimum are copied when object is. 1968N/A (
4294967296,
"4294967296")])
1968N/A """Verify that exception classes can be initialized as expected, 1968N/A and when stringified return a non-zero-length string. 1968N/A # Verify the expected behavior of all ConfigError classes. 1968N/A # Verify that exception can't be created without 1968N/A # specifying section or property. 1968N/A # Verify that exception can be created with just 1968N/A # section or property, or both, and that expected 1968N/A # value is set. In addition, verify that the 2097N/A # stringified form or unicode object is equal 1968N/A # Can't stringify base class. 2097N/A # Verify that exception can't be created without 2097N/A # Verify that exception can be created with just section 2097N/A # and that expected value is set. In addition, verify 2097N/A # that the stringified form or unicode object is equal 2097N/A # Verify that exception can't be created without 2097N/A # Verify that exception can be created with just prop 2097N/A # and that expected value is set. In addition, verify 2097N/A # that the stringified form or unicode object is equal 1968N/A """Verify list properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A ([
1,
2,
None], [
"1",
"2",
""]),
1968N/A ([
1,
"???",
"profit"], [
"1",
"???",
"profit"]),
1968N/A ([
"\xfe",
"bob cat"], [
"\xfe",
"bob cat"]),
1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"list", [
None]), (
"list", [
""])),
1968N/A ((
"list", [
"box",
"cat"]), (
"list", [
"box",
"cat"])),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"list", [
"bob cat"]), (
"list2", [
"bob cat"])),
1968N/A ((
"list", [
"lynx"]), (
"list2", [
"bob cat"])),
1968N/A # Verify stringified form and that stringified form can be used 3339N/A ([
"box",
"cat"],
"['box', 'cat']"),
3339N/A # List literal form uses unicode_escape. 3339N/A ([
"\xfe",
"bob cat"],
"['\\xfe', 'bob cat']"),
3339N/A # unicode representation in Python 3 is not using 3339N/A ([
"box",
"cat"],
"['box', 'cat']"),
3339N/A ([
"þ",
"bob cat"],
"['þ', 'bob cat']"),
1968N/A # Verify allowed value functionality permits expected values. 1968N/A "<exec:pathname>",
"<smffmri>"])
1968N/A # Verify allowed value functionality denies unexpected values. 1968N/A # Verify that any iterable can be used to assign the property's 1968N/A # value and the result will still be a list. 1968N/A """Verify publisher properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A glist = [(
None,
""), (
"",
""), (
"example.com",
"example.com"),
1968N/A (
"sub.sub.Example.Com",
"sub.sub.Example.Com"),
1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"pub",
""), (
"pub",
None)),
1968N/A ((
"pub",
"bobcat"), (
"pub",
"bobcat")),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"pub",
"bobcat"), (
"pub2",
"bobcat")),
1968N/A ((
"pub",
"lynx"), (
"pub2",
"bobcat")),
1968N/A """Verify simple list properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A ([
1,
2,
None], [
"1",
"2",
""]),
1968N/A ([
1,
"???",
"profit"], [
"1",
"???",
"profit"]),
1968N/A 123,
# Numbers not expected. 3339N/A [b
"\xfe"],
# Arbitrary 8-bit data is not 1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"slist", [
None]), (
"slist", [
""])),
1968N/A ((
"slist", [
"box",
"cat"]), (
"slist", [
"box",
"cat"])),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"slist", [
"bob cat"]), (
"slist2", [
"bob cat"])),
1968N/A ((
"slist", [
"lynx"]), (
"slist2", [
"bob cat"])),
1968N/A # Verify stringified form (note that a simple list isn't able to 1968N/A # preserve zero-length string values whenever it is the only 1968N/A ([
"box",
"cat"],
"box,cat"),
1968N/A """Verify publisher URI properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A "http:/baduri",
"example.com", {}, []]
1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"uri",
""), (
"uri",
None)),
1968N/A # Not equal because property names and/or values do not 1968N/A """Verify publisher URI list properties work as expected.""" 1968N/A # Verify default if no initial value provided. 2097N/A # Verify that all expected values are accepted at init and 2097N/A # during set and that the value is set as expected. Also 2097N/A # verify that bad values are rejected both during init and 2097N/A [
"http://@&*#($badchars"], [
"http:/baduri"],
2097N/A # Verify equality works as expected. 2097N/A # Equal because property names and values match. 2097N/A ((
"uri_list",
""), (
"uri_list", [])),
2097N/A # Not equal because property names and/or values do not 2097N/A ([
"file:/abspath"],
"['file:/abspath']")])
2097N/A """Verify publisher URI list properties work as expected.""" 2097N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A [
"http://@&*#($badchars"], [
"http:/baduri"],
1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"uri_list",
""), (
"uri_list", [])),
1968N/A # Not equal because property names and/or values do not 1968N/A ([
"file:/abspath"],
"file:/abspath")])
1968N/A """Verify UUID properties work as expected.""" 1968N/A # Verify default if no initial value provided. 1968N/A # Verify that all expected values are accepted at init and 1968N/A # during set and that the value is set as expected. Also 1968N/A # verify that bad values are rejected both during init and 1968N/A (
"16fd2706-8baf-433b-82eb-8c7fada847da",
1968N/A "16fd2706-8baf-433b-82eb-8c7fada847da")]
1968N/A # Verify equality works as expected. 1968N/A # Equal because property names and values match. 1968N/A ((
"uuid",
""), (
"uuid",
None)),
1968N/A ((
"uuid",
"16fd2706-8baf-433b-82eb-8c7fada847da"),
1968N/A (
"uuid",
"16fd2706-8baf-433b-82eb-8c7fada847da")),
1968N/A # Not equal because property names and/or values do not 1968N/A ((
"uuid",
""), (
"uuid2",
None)),
1968N/A ((
"uuid",
"16fd2706-8baf-433b-82eb-8c7fada847da"),
1968N/A (
"uuid",
"5a912a99-86dd-cb06-8ff0-b6bdfb74d0f6")),
1968N/A (
"16fd2706-8baf-433b-82eb-8c7fada847da",
1968N/A "16fd2706-8baf-433b-82eb-8c7fada847da")])
2097N/A """Class to test the functionality of the pkg.config PropertyTemplate 2097N/A """Verify base property template functionality works as 2097N/A # Verify invalid names aren't permitted. 2097N/A """Verify that create and match operations work as expected.""" 2097N/A # Verify match will match patterns as expected. 2097N/A # Verify create raises an assert if name doesn't match 2097N/A # Verify create returns expected property. 2097N/A ({
"allowed": [
"always",
"never"],
"default":
"never",
2097N/A {
"allowed": [
"always",
"never"],
"value":
"never" }),
1968N/A """Class to test the functionality of the pkg.config PropertySection 3339N/A # str() call in Python 3 must return str (unicode). 1968N/A """Verify base section functionality works as expected.""" 1968N/A # Verify invalid names aren't permitted. 1968N/A for n
in (
"contains\na new line",
"contains\ttab",
1968N/A "contains\fform feed",
"contains\vvertical tab",
1968N/A # Verify spaces are permitted. 1968N/A # Verify section objects are sorted by name and that other 1968N/A # objects are sorted after. 1968N/A [
"a",
"b",
"c",
"d",
"e",
"f",
"g"]
1968N/A # Verify equality is always False when comparing a section 1968N/A # object to a different object and that objects that are not 1968N/A # sections don't cause a traceback. 1968N/A # Verify base stringify works as expected. 1968N/A # Verify base copy works as expected. 1968N/A """Verify add_property, get_property, get_index, get_properties, 1968N/A and remove_property works as expected. 1968N/A # Verify that attempting to retrieve an unknown property 2097N/A # Verify that attempting to remove an unknown property raises 1968N/A # Verify that a property cannot be added twice. 1968N/A # Verify that get_properties returns expected value. 1968N/A # Verify that get_index returns expected value. 2097N/A """Class to test the functionality of the pkg.config PropertyTemplate 2097N/A """Verify base property section template functionality works as 2097N/A # Verify invalid names aren't permitted. 2097N/A """Verify that create and match operations work as expected.""" 2097N/A # Verify match will match patterns as expected. 2097N/A # Verify create raises an assert if name doesn't match 2097N/A # Verify create returns expected section. 1968N/A ">, nl\n, sp , tab\t, bs\\, ', \", `"),
1968N/A "<exec:pathname>",
"<smffmri>",
"builtin"],
1968N/A "publisher_default":
"example.com",
1968N/A "str_escape":
";, &, (, ), |, ^, <, >, nl\n, sp , tab\t, " \
1968N/A "list_allowed": [
"builtin"],
1968N/A "simple_list_allowed": [
"builtin"],
1968N/A "simple_list_noneallowed": [],
1968N/A "uuid_default":
"16fd2706-8baf-433b-82eb-8c7fada847da",
1968N/A # Map out the type of each section and property returned and 1968N/A # verify that if it exists in the definition that the type 1968N/A # Yield any properties for this section. 1968N/A # Class doesn't support subsections. 1968N/A # No version definitions to compare. 1968N/Apublisher_default = example.com 3158N/Alist_default = [u'{uni_escape}', 'bob cat', 'profit'] 3158N/Asimple_list_default = bar,foo,{uni_txt} 1968N/Asimple_list_allowed = builtin 1968N/Auuid_default = 16fd2706-8baf-433b-82eb-8c7fada847da 1968N/A """Verify that the base Config class functionality works as 1968N/A # Verify that write() doesn't raise an error for base Config 1968N/A # class (it should be a no-op). 1968N/A # Verify initial state of Config object. 1968N/A # Verify no definitions, overrides, or version. 1968N/A # Same as above, but with version. 1968N/A # Verify no definitions with overrides. 1968N/A # Verify with no overrides and no version (max version found in 1968N/A # Verify with no overrides and with version. 1968N/A # Verify with overrides using native values (as opposed to 1968N/A # string values) and with version. 1968N/A # Verify stringify behaviour. 1968N/A # Test str case with and without unicode data. 3339N/A # str() must return str (unicode) in Python 3. 1968N/A # Test unicode case with and without unicode data. 1968N/A """Verify that add_section, get_section, get_sections, and 1968N/A get_index work as expected. 1968N/A # Verify that attempting to retrieve an unknown section raises 2097N/A # Verify that attempting to remove an unknown section raises 1968N/A # Verify that a section cannot be added twice. 1968N/A # Verify that get_sections returns expected value. 1968N/A # Verify that get_index returns expected value. 1968N/A """Verify that read and write works as expected for 1968N/A # Verify configuration files missing state can still be loaded. 2097N/A # Verify target matches specified path. 1968N/A # Verify configuration files with unknown sections or properties 1968N/A # Verify configuration files with unknown versions can still be 1968N/A # Verify read and write of sample files. 1968N/A # Verify verison of content is auto detected and that 1968N/A # initial state matches file. 1968N/A # Verify that write only happens when needed and that perms are 1968N/A # retained on existing configuration files. 1968N/A # Verify that configuration files that do not already exist will 1968N/A # be created if the file doesn't exist, even if nothing has 1968N/A # Now the file should exist and have specific perms. 1968N/A # Calling write again shouldn't do anything since nothing 1968N/A # has changed since the last write. 1968N/A # Calling write after init shouldn't do anything since 1968N/A # nothing has changed since init. 1968N/A # Set a property; write should happen this time. 1968N/A # Verify that set value was written along with the rest 1968N/A # If overrides are set during init, the file should get 1968N/A # Verify overrides were written. 1968N/A # Verify that user-specified permissions are retained. 2097N/A """Verify that get_property, set_property, get_properties, 2097N/A set_properties, add_property_value, remove_property_value, 2097N/A and remove_property work as expected. 1968N/A # Verify no definitions, overrides, or version. 1968N/A # Verify unknown section causes exception. 1968N/A # Verify set automatically creates unknown sections and 1968N/A # Unknown properties when set are assumed to be a string 1968N/A # and forcibly cast as one if they are int, bool, etc. 2097N/A # Verify that get_properties returns expected value. 1968N/A # Verify unknown property causes exception. 1968N/A # Verify with no overrides and with version. 1968N/A # Verify that get returns set value when defaults are present. 1968N/A # Verify that Config's set_property passes through the expected 1968N/A # exception when the value given is not valid for the property. 2097N/A # Verify that setting a property that doesn't currently exist, 2097N/A # but for which there is a matching definition, will be created 2097N/A # If the section is removed, then setting any property for 2097N/A # that section should cause all properties defined for that 2097N/A # section to be set with their default values using the 2097N/A # types from the definition. 2097N/A # Verify that add_property_value and remove_property_value 2097N/A # raise exceptions when used with non-list properties. 2097N/A # Verify that add_property_value and remove_property_value 2097N/A # work as expected for list properties. 2097N/A "list_noneallowed"), [
"always"])
2097N/A # Verify that remove_property_value will raise expected error 2097N/A # if property value doesn't exist. 2097N/A "list_noneallowed",
"nosuchvalue")
2097N/A # Remove the property for following tests. 2097N/A # Verify that attempting to remove a property that doesn't exist 2097N/A # will raise the expected exception. 2097N/A # Verify that add_property_value will automatically create 2097N/A # properties, just as set_property does, if needed. 2097N/A "list_noneallowed"), [
"always"])
2097N/A # Verify that add_property_value will reject invalid values 2097N/A # just as set_property does. 2097N/A "list_noneallowed",
"notallowed")
2097N/A # Verify that attempting to remove a property in a section that 2097N/A # doesn't exist fails as expected. 2097N/A # Verify that attempting to remove a property value in for a 2097N/A # property in a section that doesn't exist fails as expected. 2097N/A "list_noneallowed",
"always")
2097N/A # Verify that setting a property for which a property section 2097N/A # template exists, but an instance of the section does not yet 2097N/A # exist, works as expected. 1968N/A<?xml version="1.0" encoding="UTF-8"?> 1968N/A<service_bundle type='manifest' name=':pkg-config'> 1968N/A <property_group name='first_section' type='application'> 1968N/A <propval name='bool_basic' type='boolean' value='false' /> 1968N/A <propval name='bool_default' type='boolean' value='true' /> 1968N/A <propval name='int_basic' type='integer' value='0' /> 1968N/A <propval name='publisher_basic' type='astring' value='' /> 1968N/A <propval name='publisher_default' type='astring' value='example.com' /> 1968N/A <propval name='str_basic' type='astring' value='' /> 1968N/A <propval name='str_escape' type='astring' value=";, &, (, ), |, ^, <, >, nl , sp , tab	, bs\\, ', ", `" /> 3158N/A <propval name='str_default' type='astring' value='{uni_txt}' /> 1968N/A <property name='list_basic' type='astring'/> 1968N/A <property name='list_default' type='ustring'> 3158N/A <value_node value="{uni_txt}" /> 1968N/A <value_node value="bob cat" /> 1968N/A <value_node value="profit" /> 1968N/A <property name='list_allowed' type='ustring'> 1968N/A <value_node value='builtin' /> 1968N/A <property name='list_noneallowed' type='ustring' /> 1968N/A <property_group name='second_section' type='application'> 1968N/A <propval name='uri_basic' type='ustring' value='' /> 1968N/A <propval name='uuid_basic' type='astring' value='' /> 1968N/A <propval name='uuid_default' type='astring' value='16fd2706-8baf-433b-82eb-8c7fada847da' /> 1968N/A <property name='simple_list_basic' type='ustring' /> 1968N/A <property name='simple_list_default' type='ustring'> 3158N/A <value_node value='{uni_txt}' /> 1968N/A <property name='simple_list_allowed' type='ustring'> 1968N/A <value_node value='builtin' /> 1968N/A <property name='simple_list_noneallowed' type='ustring' /> 1968N/A <property name='urilist_basic' type='uri' /> 1968N/A <property name='urilist_default' type='uri'> 1968N/A <stability value='Unstable' /> 1968N/A<?xml version="1.0" encoding="UTF-8"?> 1968N/A<service_bundle type='manifest' name=':pkg-config'> 1968N/A <property_group name='first_section' type='application'> 1968N/A <propval name='bool_basic' type='boolean' value='false' /> 1968N/A <propval name='str_basic' type='astring' value='' /> 1968N/A <stability value='Unstable' /> 1968N/A # Manifest and state data for testing unknown sections and properties. 1968N/A<?xml version="1.0" encoding="UTF-8"?> 1968N/A<service_bundle type='manifest' name=':pkg-config'> 1968N/A <property_group name='unknown_section1' type='application'> 1968N/A <propval name='unknown_prop11' type='astring' value='foo11' /> 1968N/A <propval name='unknown_prop12' type='astring' value='foo12' /> 1968N/A <property_group name='unknown_section2' type='application'> 1968N/A <propval name='unknown_prop21' type='astring' value='foo21' /> 1968N/A <propval name='unknown_prop22' type='astring' value='foo22' /> 1968N/A <stability value='Unstable' /> 1968N/A # Torture data for SMFConfig parsing of values that require escaping. 1968N/A<?xml version="1.0" encoding="UTF-8"?> 1968N/A<service_bundle type='manifest' name=':pkg-config'> 1968N/A <property_group name='escaped' type='application'> 1968N/A <propval name='one_slash' type='astring' value='\\' /> 1968N/A <propval name='two_slash' type='astring' value='\\\\' /> 1968N/A <propval name='one_slash_embed' type='astring' value='\\ \\' /> 1968N/A <propval name='two_slash_embed' type='astring' value='\\\\ \\\\' /> 1968N/A <propval name='end_one_slash' type='astring' value='foo\\' /> 1968N/A <propval name='end_two_slash' type='astring' value='foo\\\\' /> 1968N/A <propval name='end_embed_one_slash' type='astring' value='foo\\ \\' /> 1968N/A <propval name='end_embed_two_slash' type='astring' value='foo\\\\ \\\\' /> 1968N/A <propval name='multi_line' type='astring' value='foo\\ \\ \\ \\' /> 1968N/A <property name='list_multi_line' type='ustring'> 1968N/A <value_node value="foo\\ \\ \\ \\" /> 1968N/A <value_node value=";, &, (, ), |, ^, <, >, nl , sp , tab	, bs\\, ', ", `" /> 1968N/A <value_node value="Eat at Joe's! 	Really; eat at Joe's please." /> 1968N/A <stability value='Unstable' /> 1968N/A ";, &, (, ), |, ^, <, >, nl\n, sp , tab\t, bs\\, ', \", `",
1968N/A "Eat at Joe's!\n\tReally; eat at Joe's please." 1968N/A "one_slash_embed":
"\\\n\\",
1968N/A "two_slash_embed":
"\\\\\n\\\\",
1968N/A "end_embed_one_slash":
"foo\\\n\\",
1968N/A "end_two_slash":
"foo\\\\",
1968N/A "end_embed_two_slash":
"foo\\\\\n\\\\",
1968N/A "multi_line":
"foo\\\n\n\\\n\n\\\n\\",
1968N/A ";, &, (, ), |, ^, <, >, nl\n, sp , tab\t, bs\\, ', \", `",
1968N/A "Eat at Joe's!\n\tReally; eat at Joe's please." 1968N/A """Create a new SMF repository importing only the specified 3158N/A "SVCCFG_REPOSITORY={sc_repo_filename} " 1968N/A # The door file will exist but will fail 1968N/A # os.path.isfile() check if the process 1968N/A """Verify that exception classes can be initialized as expected, 1968N/A and when stringified return a non-zero-length string. 1968N/A # Verify the expected behavior of all SMF exception classes. 1968N/A # Verify that exception can't be created without 1968N/A # specifying svc_fmri and errmsg. 1968N/A # Verify that the properties specified at init can 2097N/A # Verify that exception can't be created without specifying 2097N/A # Verify that exception can be created with just section and 2097N/A # that expected value is set. In addition, verify that the 2097N/A # stringified form or unicode object is equal and not zero- 2097N/A # Verify that exception can't be created without specifying 2097N/A # Verify that exception can be created with just prop and that 2097N/A # expected value is set. In addition, verify that the 2097N/A # stringified form or unicode object is equal and not zero- 1968N/A """Verify that add_section and set_property works as expected. 1968N/A (SMFConfig enforces additional restrictions on naming.) 1968N/A # Retrieve configuration data from SMF. 1968N/A # Removing the files stops configd. 1968N/A # Verify that SMFConfig's add_section passes through the 1968N/A # expected exception when the name of the property section 1968N/A # Verify that SMFConfig's set_property passes through the 1968N/A # expected exception when the name of the property is not 1968N/A """Verify that read works as expected for SMFConfig.""" 1968N/A # Verify read and write of sample configuration. 1968N/A # Retrieve configuration data from SMF. 1968N/A # Verify initial state matches expected. 1968N/A # Verify SMFConfig raises exception if write() is 1968N/A # attempted (not currently supported). 1968N/A # Verify configuration data with unknown sections or properties 1968N/A # Verify configuration data that requires extensive escaping 1968N/A # during parsing can be loaded. 1968N/A # Verify that an SMFReadError is raised if the configuration 1968N/A # data cannot be read from SMF. (This should fail since