File: tripleSlashRefPathCompletionRelativePaths.ts

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (77 lines) | stat: -rw-r--r-- 2,000 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
/// <reference path='fourslash.ts' />

// Exercises relative path completions going up and down 2 directories
// and the use of forward- and back-slashes and combinations thereof.

// @Filename: f.ts
//// /*f1*/
// @Filename: d1/g.ts
//// /*g1*/
// @Filename: d1/d2/h.ts
//// /*h1*/
// @Filename: d1/d2/d3/i.ts
//// /*i1*/
// @Filename: d1/d2/d3/d4/j.ts
//// /*j1*/

// @Filename: d1/d2/test.ts
//// /// <reference path="/*0*/
//// /// <reference path=".//*1*/
//// /// <reference path="./*2*/
//// /// <reference path="../*3*/
//// /// <reference path="d3/*4*/

//// /// <reference path="..//*5*/
//// /// <reference path="..\/*6*/

//// /// <reference path="../..//*7*/

//// /// <reference path="d3//*8*/
//// /// <reference path="./d3//*9*/

//// /// <reference path="d3/d4//*10*/
//// /// <reference path="./d3/d4//*11*/

workingDirCompletions();
parentDirCompletions();
childDirCompletions();

function workingDirCompletions() {
    for (let m = 0; m < 5; ++m) {
        goTo.marker("" + m);
        verify.completionListContains("h.ts");
        verify.completionListContains("d3");
        verify.not.completionListItemsCountIsGreaterThan(2);
    }
}

function parentDirCompletions() {

    for (let m of ["5", "6"]) {
        goTo.marker(m);
        verify.completionListContains("g.ts");
        verify.completionListContains("d2");
        verify.not.completionListItemsCountIsGreaterThan(2);
    }

    goTo.marker("7");
    verify.completionListContains("f.ts");
    verify.completionListContains("d1");
    verify.not.completionListItemsCountIsGreaterThan(2);
}

function childDirCompletions() {

    for (let m of ["8", "9"]) {
        goTo.marker(m);
        verify.completionListContains("i.ts");
        verify.completionListContains("d4");
        verify.not.completionListItemsCountIsGreaterThan(2);
    }

    for (let m of ["10", "11"]) {
        goTo.marker(m);
        verify.completionListContains("j.ts");
        verify.not.completionListItemsCountIsGreaterThan(1);
    }
}