Пример #1
0
    def get_setvars_c(self, builder, prefix):
        dict = { }
        dict["prefix"] = prefix
        dict["ucprefix"] = prefix.upper()
        dict["body_impl"] = self.get_c_subst_var(prefix)

        rsrc = builder.resource_body("c_env.c")
        return subst.subst_str(rsrc, None, dict)
Пример #2
0
def subst_unit_test():
    """
    Substitution unit test.
    """

    test_env = { "FISH" : "soup", "WOMBAT" : "herring" }
    result = subst.subst_str("${WOMBAT} is ${FISH}", None, test_env)
    assert result == "herring is soup"

    return 0
Пример #3
0
def subst_unit_test():
    """
    Substitution unit test.
    """

    test_env = {"FISH": "soup", "WOMBAT": "herring"}
    result = subst.subst_str("${WOMBAT} is ${FISH}", None, test_env)
    assert result == "herring is soup"

    return 0