コード例 #1
0
        public void GetRegisteredExtensions_LangWithNoExt()
        {
            ScriptRuntime runtime = ScriptRuntimeTest.CreatePythonOnlyRuntime(new string[] { "py" }, new string[] { });
            ScriptEngine  engine  = runtime.GetEngine("py");

            Assert.IsTrue(0 == engine.Setup.FileExtensions.Count);
        }
コード例 #2
0
        public void GetRegisteredIdentifiers_LangWithNoIDs_Test()
        {
            ScriptRuntime runtime = ScriptRuntimeTest.CreatePythonOnlyRuntime(new string[] { }, new string[] { ".py" });
            ScriptEngine  engine  = runtime.GetEngineByFileExtension("py");

            Assert.IsTrue(0 == engine.Setup.Names.Count);
        }
コード例 #3
0
        [Ignore]//Unregistering a language is not supported. So this test may have to be removed
        public void GetEngineByFileExtension_UnRegisteredExtensions()
        {
            ScriptRuntime runtime = ScriptRuntimeTest.CreatePythonOnlyRuntime(new[] { "py" }, new[] { ".py" });

            Assert.IsTrue(1 == runtime.Setup.LanguageSetups.Count);
            // @TODO - How do we un-register a language? what
            //         are the expected results.
            Assert.Inconclusive(
                "How do we un-register a language? what are the expected results");
        }
コード例 #4
0
        public void Configuration_OneRegisteredLanguageName()
        {
            ScriptRuntime runtime = ScriptRuntimeTest.CreatePythonOnlyRuntime(new[] { "py" }, new[] { ".py" });

            Assert.IsTrue(1 == runtime.Setup.LanguageSetups[0].Names.Count);
        }