예제 #1
0
        public void parseMSBuildUnloopingTest5()
        {
            var env     = new StubEnv();
            var uvar    = new UserVariable();
            var msbuild = new vsSBE.MSBuild.Parser(env, uvar);
            var sbe     = new Script(env, uvar);

            msbuild.parse(sbe.parse("#[var test = $$(test)]#[var test = 1 $(test) 2]", true));

            uvar.unsetAll();
            msbuild.parse(sbe.parse("#[var test = $$(test)]#[var test = 1 $(test.Replace('1', '2')) 2]", true));

            uvar.unsetAll();
            msbuild.parse(sbe.parse("#[var test = $(test)]#[var test = 1 $(test) 2]", true));
        }
        public void unsetAllTest()
        {
            UserVariable target = new UserVariable();

            target.set("name", null, "unevaluated");
            target.unsetAll();
            Assert.AreEqual(target.Variables.Count(), 0);
        }