Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/new-smoke-all-test.sh
3544 views
1
smokeAllFolder=./docs/smoke-all
2
3
cwd=$(dirname $0)
4
5
cd $smokeAllFolder
6
7
year=$(date +"%Y")
8
month=$(date +"%m")
9
day=$(date +"%d")
10
11
CheckCreateAndEnter() {
12
[[ ! -d "$1" ]] && mkdir -p $1
13
cd $1
14
}
15
16
CheckCreateAndEnter $year
17
CheckCreateAndEnter $month
18
CheckCreateAndEnter $day
19
20
file=$1
21
22
YAML=$(cat << EOF
23
---
24
format: html
25
_quarto:
26
tests:
27
html:
28
ensureHtmlElements:
29
- []
30
- []
31
ensureFileRegexMatches:
32
- []
33
- []
34
revealjs:
35
ensureHtmlElements:
36
- []
37
- []
38
ensureFileRegexMatches:
39
- []
40
- []
41
latex:
42
ensureFileRegexMatches:
43
- []
44
- []
45
pdf:
46
noErrors: default
47
fileExists:
48
supportPath: mediabag/lter_penguins.png
49
ensureLatexFileRegexMatches:
50
- []
51
- []
52
typst:
53
ensureFileRegexMatches:
54
- []
55
- []
56
ensureTypstFileRegexMatches:
57
- []
58
- []
59
docx:
60
ensureDocxRegexMatches:
61
- []
62
- []
63
ensureDocxXpath:
64
- []
65
- []
66
pptx:
67
ensurePptxRegexMatches:
68
- []
69
- []
70
ensurePptxXPath:
71
-
72
- 2
73
- []
74
- []
75
ensurePptxLayout:
76
-
77
- 2
78
- "Title and Content"
79
asciidoc: default
80
---
81
EOF
82
)
83
84
if [ ! -f "$file" ]; then
85
echo "$YAML" > $file
86
fi
87
88
if [[ -z $(command -v code) ]]; then
89
vscode=true
90
fi
91
92
$vscode && code $file
93
94
cd $cwd
95