Skip to content

Commit

Permalink
Merge pull request #2181 from posit-dev/kg-new-line-fix
Browse files Browse the repository at this point in the history
fix tests for new line file array
  • Loading branch information
kgartland-rstudio authored Aug 26, 2024
2 parents 8503e6a + 69e682d commit 6bf0898
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/bats/contract/deploy.bats
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ init_with_fields() {
perl -i -pe '$_ .= qq(description = "'"${CONTENT}"' description"\n) if /title/' ${FULL_PATH}/.posit/publish/${CONTENT}.toml

if [[ ${ADDITIONAL_FILES} ]]; then
perl -i -pe "s/(files = \[.*)\]/\1, '${ADDITIONAL_FILES}']/" ${FULL_PATH}/.posit/publish/${CONTENT}.toml
perl -i -0777 -pe "s/(files = \[.*?)(\s*\])/\1, '${ADDITIONAL_FILES}'\2/s" ${FULL_PATH}/.posit/publish/${CONTENT}.toml
fi

# add Connect runtime fields for interactive content
Expand Down
2 changes: 1 addition & 1 deletion test/vscode-ui/test/specs/fastapi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe("VS Code Extension UI Test", () => {
);
const fileContent = fs.readFileSync(filePath, "utf8");
await expect(fileContent).toContain(
"type = 'python-fastapi'\nentrypoint = 'simple.py'\nvalidate = true\nfiles = ['simple.py', 'requirements.txt']\ntitle = 'my fastapi app'",
"type = 'python-fastapi'\nentrypoint = 'simple.py'\nvalidate = true\nfiles = [\n 'simple.py',\n 'requirements.txt'\n]\ntitle = 'my fastapi app'",
);
});

Expand Down
2 changes: 1 addition & 1 deletion test/vscode-ui/test/specs/nested-fastapi.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ describe("Nested Fast API Deployment", () => {
);
const fileContent = fs.readFileSync(filePath, "utf8");
await expect(fileContent).toContain(
"type = 'python-fastapi'\nentrypoint = 'simple.py'\nvalidate = true\nfiles = ['simple.py', 'requirements.txt']\ntitle = 'my fastapi app'",
"type = 'python-fastapi'\nentrypoint = 'simple.py'\nvalidate = true\nfiles = [\n 'simple.py',\n 'requirements.txt'\n]\ntitle = 'my fastapi app'",
);
});

Expand Down

0 comments on commit 6bf0898

Please sign in to comment.