Skip to content

Commit b6980b6

Browse files
committed
Update fixtures with additional cases
1 parent 7e07b96 commit b6980b6

File tree

3 files changed

+26
-18
lines changed

3 files changed

+26
-18
lines changed

server/src/__tests__/analyzer.test.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -485,11 +485,11 @@ describe('findDeclarationsMatchingWord', () => {
485485
"location": Object {
486486
"range": Object {
487487
"end": Object {
488-
"character": 19,
488+
"character": 25,
489489
"line": 6,
490490
},
491491
"start": Object {
492-
"character": 0,
492+
"character": 6,
493493
"line": 6,
494494
},
495495
},
@@ -514,11 +514,11 @@ describe('findDeclarationsMatchingWord', () => {
514514
"location": Object {
515515
"range": Object {
516516
"end": Object {
517-
"character": 19,
517+
"character": 25,
518518
"line": 6,
519519
},
520520
"start": Object {
521-
"character": 0,
521+
"character": 6,
522522
"line": 6,
523523
},
524524
},
@@ -566,11 +566,11 @@ describe('findDeclarationsMatchingWord', () => {
566566
"location": Object {
567567
"range": Object {
568568
"end": Object {
569-
"character": 19,
569+
"character": 25,
570570
"line": 6,
571571
},
572572
"start": Object {
573-
"character": 0,
573+
"character": 6,
574574
"line": 6,
575575
},
576576
},
@@ -927,11 +927,11 @@ describe('getAllVariables', () => {
927927
"location": Object {
928928
"range": Object {
929929
"end": Object {
930-
"character": 19,
930+
"character": 25,
931931
"line": 6,
932932
},
933933
"start": Object {
934-
"character": 0,
934+
"character": 6,
935935
"line": 6,
936936
},
937937
},
@@ -944,11 +944,11 @@ describe('getAllVariables', () => {
944944
"location": Object {
945945
"range": Object {
946946
"end": Object {
947-
"character": 16,
947+
"character": 23,
948948
"line": 7,
949949
},
950950
"start": Object {
951-
"character": 0,
951+
"character": 7,
952952
"line": 7,
953953
},
954954
},
@@ -961,12 +961,12 @@ describe('getAllVariables', () => {
961961
"location": Object {
962962
"range": Object {
963963
"end": Object {
964-
"character": 17,
965-
"line": 8,
964+
"character": 19,
965+
"line": 10,
966966
},
967967
"start": Object {
968-
"character": 0,
969-
"line": 8,
968+
"character": 2,
969+
"line": 10,
970970
},
971971
},
972972
"uri": "file://${FIXTURE_FOLDER}extension.inc",

testing/fixtures.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const FIXTURE_URI = {
2121
ISSUE101: `file://${path.join(FIXTURE_FOLDER, 'issue101.sh')}`,
2222
ISSUE206: `file://${path.join(FIXTURE_FOLDER, 'issue206.sh')}`,
2323
MISSING_EXTENSION: `file://${path.join(FIXTURE_FOLDER, 'extension')}`,
24+
EXTENSION_INC: `file://${path.join(FIXTURE_FOLDER, 'extension.inc')}`,
2425
MISSING_NODE: `file://${path.join(FIXTURE_FOLDER, 'missing-node.sh')}`,
2526
OPTIONS: `file://${path.join(FIXTURE_FOLDER, 'options.sh')}`,
2627
OVERRIDE_SYMBOL: `file://${path.join(FIXTURE_FOLDER, 'override-executable-symbol.sh')}`,

testing/fixtures/extension.inc

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,21 @@ source ./issue101.sh
44

55
RED=`tput setaf 1`
66
GREEN=`tput setaf 2`
7-
BLUE=`tput setaf 4`
8-
BOLD=`tput bold`
9-
RESET=`tput sgr0`
7+
local BLUE=`tput setaf 4` # local at the root is still exposed to the global scope
8+
export BOLD=`tput bold`
9+
10+
{ # non colors in a group
11+
RESET=`tput sgr0`
12+
}
1013

1114
extensionFunc() {
1215
LOCAL_VARIABLE='local'
1316

1417
innerExtensionFunc() {
1518
echo $LOCAL_VARIABLE
1619
}
17-
}
20+
}
21+
22+
if [ "${ENV}" = "prod" ]; then
23+
RED="" # Ignored as we do not flowtrace.
24+
fi

0 commit comments

Comments
 (0)