From eee0b5e4eae37ec56b78668c16d715c705a81a5c Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 14 Jan 2009 17:31:14 +0000 Subject: Basic tests for colour values. svn path=/trunk/libcss/; revision=6066 --- test/data/parse/colours.dat | 76 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 test/data/parse/colours.dat (limited to 'test/data/parse/colours.dat') diff --git a/test/data/parse/colours.dat b/test/data/parse/colours.dat new file mode 100644 index 0000000..6a66205 --- /dev/null +++ b/test/data/parse/colours.dat @@ -0,0 +1,76 @@ +## Simple colour values + +##data +#* { color: red } +##errors +##expected +#| 1 * +#| 0x0200000f 0xff000000 +##reset + +#data +* { color: #f00 } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +#data +* { color: #ff0000 } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +#data +* { color: rgb(255, 0, 0) } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +#data +* { color: rgb(100%, 0%, 0%) } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +## Out-of-range rgb() parameters + +#data +* { color: rgb(300, 0, 0) } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +#data +* { color: rgb(-10, 0, 0) } +#errors +#expected +| 1 * +| 0x0200000f 0x00000000 +#reset + +#data +* { color: rgb(150%, 0%, 0%) } +#errors +#expected +| 1 * +| 0x0200000f 0xff000000 +#reset + +#data +* { color: rgb(-10%, 0%, 0%) } +#errors +#expected +| 1 * +| 0x0200000f 0x00000000 +#reset + -- cgit v1.2.3