当前位置: 首页>>代码示例>>Java>>正文


Java Config.setEscapeKeyOnly方法代码示例

本文整理汇总了Java中org.ini4j.Config.setEscapeKeyOnly方法的典型用法代码示例。如果您正苦于以下问题:Java Config.setEscapeKeyOnly方法的具体用法?Java Config.setEscapeKeyOnly怎么用?Java Config.setEscapeKeyOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ini4j.Config的用法示例。


在下文中一共展示了Config.setEscapeKeyOnly方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testEscape

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testEscape() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(false);
    cfg.setEscape(true);
    cfg.setEscapeKeyOnly(false);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_ESCAPED);
    exp.append(" = ");
    exp.append(ESCAPE_VALUE_ESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例2: testEscapeFalse

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testEscapeFalse() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(false);
    cfg.setEscape(false);
    cfg.setEscapeKeyOnly(false);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_UNESCAPED);
    exp.append(" = ");
    exp.append(ESCAPE_VALUE_UNESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例3: testEscapeKeyOnly

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testEscapeKeyOnly() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(false);
    cfg.setEscape(true);
    cfg.setEscapeKeyOnly(true);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_ESCAPED);
    exp.append(" = ");
    exp.append(ESCAPE_VALUE_UNESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例4: testWithStrictOperatorEscape

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testWithStrictOperatorEscape() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(true);
    cfg.setEscape(true);
    cfg.setEscapeKeyOnly(false);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_ESCAPED);
    exp.append('=');
    exp.append(ESCAPE_VALUE_ESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例5: testWithStrictOperatorEscapeFalse

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testWithStrictOperatorEscapeFalse() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(true);
    cfg.setEscape(false);
    cfg.setEscapeKeyOnly(false);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_UNESCAPED);
    exp.append('=');
    exp.append(ESCAPE_VALUE_UNESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例6: testWithStrictOperatorEscapeKeyOnly

import org.ini4j.Config; //导入方法依赖的package包/类
@Test public void testWithStrictOperatorEscapeKeyOnly() throws Exception
{
    Config cfg = new Config();

    cfg.setStrictOperator(true);
    cfg.setEscape(true);
    cfg.setEscapeKeyOnly(true);
    Options opts = new Options();

    opts.setConfig(cfg);
    opts.put(ESCAPE_KEY_UNESCAPED, ESCAPE_VALUE_UNESCAPED);
    opts.put(Dwarf.PROP_WEIGHT, null);
    StringWriter writer = new StringWriter();

    opts.store(writer);
    StringBuilder exp = new StringBuilder();

    exp.append(ESCAPE_KEY_ESCAPED);
    exp.append('=');
    exp.append(ESCAPE_VALUE_UNESCAPED);
    exp.append(NL);
    assertEquals(exp.toString(), writer.toString());
}
 
开发者ID:JetBrains,项目名称:intellij-deps-ini4j,代码行数:24,代码来源:OptionsFormatterTest.java

示例7: configureIni4j

import org.ini4j.Config; //导入方法依赖的package包/类
private void configureIni4j() {
    Config c = mIni.getConfig();
    c.setEscapeKeyOnly(true);
    mIni.setConfig(c);
}
 
开发者ID:efidroid,项目名称:android_app_efidroidmanager,代码行数:6,代码来源:OperatingSystem.java


注:本文中的org.ini4j.Config.setEscapeKeyOnly方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。