コード例 #1
0
ファイル: ZenCodingTest.cs プロジェクト: waodng/VSIX
        //[TestMethod, TestCategory("Completion")]
        public async Task AspxZenCodingTest()
        {
            var textView = await VSHost.TypeText(".aspx", "#id.class\t");

            await VSHost.Dispatcher.NextFrame(DispatcherPriority.ApplicationIdle);

            textView.GetText().Should().Be("<div id=\"id\" class=\"class\"></div>");
        }
コード例 #2
0
        public async Task UseStrictEmptyFile()
        {
            var textView = await VSHost.TypeText(".js", "'");

            textView.IsCompletionOpen().Should().BeTrue();
            await VSHost.TypeString("\t");

            textView.GetText().Should().Be("'use strict';");
            textView.IsCompletionOpen().Should().BeFalse();
        }
コード例 #3
0
        public async Task BlockCommentCompletion()
        {
            SettingsStore.EnterTestMode(new WESettings
            {
                JavaScript = { BlockCommentCompletion = true }
            });
            var textView = await VSHost.TypeText(".js", "/*");

            textView.GetText().Should().Be("/**/");
        }
コード例 #4
0
        public async Task BlockCommentStarCompletionDisabled()
        {
            SettingsStore.EnterTestMode(new WESettings
            {
                JavaScript = { BlockCommentCompletion = false }
            });

            var textView = await VSHost.TypeText(".js", "/*\n");

            textView.GetText().Should().Be("/*\r\n");
        }
コード例 #5
0
        public async Task BackspaceDismisses()
        {
            var textView = await VSHost.TypeText(".js", "'u");

            textView.IsCompletionOpen().Should().BeTrue();
            await VSHost.TypeString("\b");

            textView.IsCompletionOpen().Should().BeTrue();
            await VSHost.TypeString("\b");

            textView.IsCompletionOpen().Should().BeFalse();
        }
コード例 #6
0
        public async Task GetElementsByTagName()
        {
            var textView = await VSHost.TypeText(".js", "document.body.getElementsByTagName('ta')");

            textView.GetText().Should().Be("document.body.getElementsByTagName('table')");
        }
コード例 #7
0
        public async Task DontActivateElsewhere()
        {
            var textView = await VSHost.TypeText(".js", "var x = {\n'u");

            textView.IsCompletionOpen().Should().BeFalse();
        }
コード例 #8
0
        public async Task UseAsmFunction()
        {
            var textView = await VSHost.TypeText(".js", "var a=function(){\n\"use a\"");

            textView.GetText().Should().EndWith("\"use asm\"\r\n}");
        }