Add keywords inclusion tests

This commit is contained in:
Jeremy Thomas 2020-08-08 17:16:04 +01:00
parent 25226a9ed6
commit eb604e5fff
19 changed files with 225 additions and 3 deletions

View File

@ -228,6 +228,13 @@
"title": "Sanyo Digital",
"width":"160",
"height":"33"
},
"coupons4printing": {
"name": "coupons4printing",
"url": "https://www.coupons4printing.com/",
"title": "Coupons For Printing",
"width":"60",
"height":"60"
}
},
"home": [
@ -250,6 +257,7 @@
,"tutlance"
,"pillarwm"
,"sanyodigital"
,"coupons4printing"
],
"footer": [
"polygon"

View File

@ -7,7 +7,7 @@
<body
class="layout-{{ page.layout }}{% if page.doc-tab %} page-{{ page.doc-tab}}{% endif %}"
>
{% include global/notice.html %}
<!-- {% include global/notice.html %} -->
{% include global/deprecated.html %}
{{ content }}
{% include global/footer.html %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1,3 +1,4 @@
/* Bulma Base */
@charset "utf-8"
@import "minireset.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Components */
@charset "utf-8"
@import "breadcrumb.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Elements */
@charset "utf-8"
@import "box.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Form */
@charset "utf-8"
@import "shared.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Grid */
@charset "utf-8"
@import "columns.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Helpers */
@charset "utf-8"
@import "color.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Layout */
@charset "utf-8"
@import "hero.sass"

View File

@ -1,3 +1,4 @@
/* Bulma Utilities */
@charset "utf-8"
@import "initial-variables.sass"

2
test/keywords.txt Normal file
View File

@ -0,0 +1,2 @@
bulma.io v0.9.0
.button.is-primary

View File

@ -0,0 +1,70 @@
\* Bulma Base \*
minireset.css
html
article
aside
\* Bulma Components \*
.breadcrumb
.card
.dropdown
.level
.media
.menu
.message
.message.is-primary
.modal
.navbar
.navbar.is-primary
.pagination
.panel
.tabs
\* Bulma Elements \*
.box
.button
.button.is-primary
.container
.content
.form
.icon
.notification
.notification.is-primary
.block
.delete
.progress
.table
.tag
.tag:not(body).is-primary
.title
\* Bulma Form \*
.checkbox
.radio
.file
.input
.is-primary.input
.textarea
.is-primary.textarea
.select
.select.is-primary
.label
.help
.field
\* Bulma Grid \*
.column
.columns
.columns.is-variable
.tile
\* Bulma Helpers \*
.has-text-primary
.has-text-primary-light
.has-text-primary-dark
.has-background-primary
.has-background-primary-light
.has-background-primary-dark
\* Bulma Utilities \*
@keyframes spinAround

View File

@ -0,0 +1,70 @@
\* Bulma Base \*
minireset.css
html
article
aside
\* Bulma Components \*
.breadcrumb
.card
.dropdown
.level
.media
.menu
.message
.message.is-primary
.modal
.navbar
.navbar.is-primary
.pagination
.panel
.tabs
\* Bulma Elements \*
.box
.button
.button.is-primary
.container
.content
.form
.icon
.notification
.notification.is-primary
.block
.delete
.progress
.table
.tag
.tag:not(body).is-primary
.title
\* Bulma Form \*
.checkbox
.radio
.file
.input
.is-primary.input
.textarea
.is-primary.textarea
.select
.select.is-primary
.label
.help
.field
\* Bulma Grid \*
.column
.columns
.columns.is-variable
.tile
\* Bulma Helpers \*
.has-text-primary
.has-text-primary-light
.has-text-primary-dark
.has-background-primary
.has-background-primary-light
.has-background-primary-dark
\* Bulma Utilities \*
@keyframes spinAround

View File

@ -0,0 +1,32 @@
https://fonts.googleapis.com/css?family=Nunito:400,700
\* Bulma Base \*
minireset.css
html
article
aside
.navbar
.navbar.is-primary
.button
.button.is-primary
.container
.title
\* Bulma Form \*
.checkbox
.radio
.file
.input
.is-primary.input
.textarea
.is-primary.textarea
.select
.select.is-primary
.label
.help
.field
\* Bulma Utilities \*
@keyframes spinAround

View File

@ -0,0 +1,5 @@
\* Bulma Base \*
minireset.css
html
article
aside

View File

@ -0,0 +1,7 @@
\* Bulma Base \*
minireset.css
html
article
aside
hsl(39, 100%, 92%)

View File

@ -5,6 +5,7 @@
TEST_DIR=$(dirname $BASH_SOURCE)
FILES=$TEST_DIR/sass/*
CSS_DIR=$TEST_DIR/css
CSS_FILES=$TEST_DIR/css/*.css
SASS_OPTIONS=--sourcemap=none
# FUNCTIONS
@ -20,7 +21,7 @@ build_sass()
sass "$1" "${destFile}"
}
run_it()
build_all_css_files()
{
rm -r $CSS_DIR
@ -40,6 +41,25 @@ run_it()
fi
}
check_keywords_inclusion()
{
for f in $CSS_FILES
do
BASE=$(basename $f)
KEYWORDS_FILE=$TEST_DIR/keywords/$BASE.txt
while read p; do
if ! grep -q "$p" "$f"
then
# echo "Ok"
# else
echo "$p not found in $f"
fi
# echo "Checking for $p "
done < $KEYWORDS_FILE
done
}
# EXECUTION
run_it $@
build_all_css_files $@
check_keywords_inclusion $@