[gtk+] tests: Add tests for font-family
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Add tests for font-family
- Date: Wed, 15 Jun 2011 11:46:31 +0000 (UTC)
commit d3535ff6ce963844bb87aabfaec0ac61d5bcba40
Author: Benjamin Otte <otte redhat com>
Date: Sun May 29 05:24:28 2011 +0200
tests: Add tests for font-family
This readds the tests now that font-family works again. They were
previously removed when font-family support was backed out due to bugs.
tests/css/parser/Makefile.am | 3 ++
tests/css/parser/font-family.css | 65 ++++++++++++++++++++++++++++++++++
tests/css/parser/font-family.errors | 8 ++++
tests/css/parser/font-family.ref.css | 27 ++++++++++++++
4 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/tests/css/parser/Makefile.am b/tests/css/parser/Makefile.am
index fc3380c..27d2ac0 100644
--- a/tests/css/parser/Makefile.am
+++ b/tests/css/parser/Makefile.am
@@ -57,6 +57,9 @@ EXTRA_DIST += \
enum.css \
enum.errors \
enum.ref.css \
+ font-family.css \
+ font-family.errors \
+ font-family.ref.css \
import-cyclic-1.css \
import-cyclic-1.errors \
import-cyclic-1.ref.css \
diff --git a/tests/css/parser/font-family.css b/tests/css/parser/font-family.css
new file mode 100644
index 0000000..700fc81
--- /dev/null
+++ b/tests/css/parser/font-family.css
@@ -0,0 +1,65 @@
+a {
+ font-family: none;
+}
+
+b {
+ font-family: Sans Serif;
+}
+
+c {
+ font-family: A Font with a lot of text\2C spaces and special characters\2122;
+}
+
+d {
+ font-family: "A Font with a lot of text, spaces and special charactersâ" ;
+}
+
+e {
+ font-family: A, Lot, Of, Fonts;
+}
+
+f {
+ font-family: "A", "Lot", "Of", "Fonts";
+}
+
+g {
+ font-family: "A Lot", Of, "Fonts";
+}
+
+/* errors straight from the CSS 2.1 spec */
+
+cssa {
+ font-family: Red/Black, sans-serif;
+}
+
+cssb {
+ font-family: "Lucida" Grande, sans-serif;
+}
+
+cssc {
+ font-family: Ahem!, sans-serif;
+}
+
+cssd {
+ font-family: test foo, sans-serif;
+}
+
+csse {
+ font-family: #POUND, sans-serif;
+}
+
+cssf {
+ font-family: Hawaii 5-0, sans-serif;
+}
+
+/* errors */
+
+ea {
+ font-family: ;
+}
+
+eb {
+ font-family: No comma at the end, please, ;
+}
+
+
diff --git a/tests/css/parser/font-family.errors b/tests/css/parser/font-family.errors
new file mode 100644
index 0000000..cf0d71a
--- /dev/null
+++ b/tests/css/parser/font-family.errors
@@ -0,0 +1,8 @@
+font-family.css:32: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:36: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:40: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:44: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:48: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:52: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:58: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
+font-family.css:62: error: GTK_CSS_PROVIDER_ERROR_SYNTAX
diff --git a/tests/css/parser/font-family.ref.css b/tests/css/parser/font-family.ref.css
new file mode 100644
index 0000000..b770bf4
--- /dev/null
+++ b/tests/css/parser/font-family.ref.css
@@ -0,0 +1,27 @@
+a {
+ font-family: none;
+}
+
+b {
+ font-family: "Sans Serif";
+}
+
+c {
+ font-family: "A Font with a lot of text, spaces and special charactersâ";
+}
+
+d {
+ font-family: "A Font with a lot of text, spaces and special charactersâ";
+}
+
+e {
+ font-family: "A", "Lot", "Of", "Fonts";
+}
+
+f {
+ font-family: "A", "Lot", "Of", "Fonts";
+}
+
+g {
+ font-family: "A Lot", "Of", "Fonts";
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]