Skip to content

Commit

Permalink
Update fixtures with additional cases
Browse files Browse the repository at this point in the history
  • Loading branch information
skovhus committed Jan 18, 2023
1 parent 1b7695c commit 0b765f7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 18 deletions.
28 changes: 14 additions & 14 deletions server/src/__tests__/analyzer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,11 @@ describe('findDeclarationsMatchingWord', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 19,
"character": 25,
"line": 6,
},
"start": Object {
"character": 0,
"character": 6,
"line": 6,
},
},
Expand All @@ -483,11 +483,11 @@ describe('findDeclarationsMatchingWord', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 19,
"character": 25,
"line": 6,
},
"start": Object {
"character": 0,
"character": 6,
"line": 6,
},
},
Expand Down Expand Up @@ -535,11 +535,11 @@ describe('findDeclarationsMatchingWord', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 19,
"character": 25,
"line": 6,
},
"start": Object {
"character": 0,
"character": 6,
"line": 6,
},
},
Expand Down Expand Up @@ -901,11 +901,11 @@ describe('getAllVariables', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 19,
"character": 25,
"line": 6,
},
"start": Object {
"character": 0,
"character": 6,
"line": 6,
},
},
Expand All @@ -918,11 +918,11 @@ describe('getAllVariables', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 16,
"character": 23,
"line": 7,
},
"start": Object {
"character": 0,
"character": 7,
"line": 7,
},
},
Expand All @@ -935,12 +935,12 @@ describe('getAllVariables', () => {
"location": Object {
"range": Object {
"end": Object {
"character": 17,
"line": 8,
"character": 19,
"line": 10,
},
"start": Object {
"character": 0,
"line": 8,
"character": 2,
"line": 10,
},
},
"uri": "file://${FIXTURE_FOLDER}extension.inc",
Expand Down
1 change: 1 addition & 0 deletions testing/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export const FIXTURE_URI = {
ISSUE101: `file://${path.join(FIXTURE_FOLDER, 'issue101.sh')}`,
ISSUE206: `file://${path.join(FIXTURE_FOLDER, 'issue206.sh')}`,
MISSING_EXTENSION: `file://${path.join(FIXTURE_FOLDER, 'extension')}`,
EXTENSION_INC: `file://${path.join(FIXTURE_FOLDER, 'extension.inc')}`,
MISSING_NODE: `file://${path.join(FIXTURE_FOLDER, 'missing-node.sh')}`,
OPTIONS: `file://${path.join(FIXTURE_FOLDER, 'options.sh')}`,
OVERRIDE_SYMBOL: `file://${path.join(FIXTURE_FOLDER, 'override-executable-symbol.sh')}`,
Expand Down
15 changes: 11 additions & 4 deletions testing/fixtures/extension.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,21 @@ source ./issue101.sh

RED=`tput setaf 1`
GREEN=`tput setaf 2`
BLUE=`tput setaf 4`
BOLD=`tput bold`
RESET=`tput sgr0`
local BLUE=`tput setaf 4` # local at the root is still exposed to the global scope
export BOLD=`tput bold`

{ # non colors in a group
RESET=`tput sgr0`
}

extensionFunc() {
LOCAL_VARIABLE='local'

innerExtensionFunc() {
echo $LOCAL_VARIABLE
}
}
}

if [ "${ENV}" = "prod" ]; then
RED="" # Ignored as we do not flowtrace.
fi

0 comments on commit 0b765f7

Please sign in to comment.