W3C home > Mailing lists > Public > public-css-testsuite@w3.org > April 2012

Format guidelines for tests (particularly HTML5)

From: Aryeh Gregor <ayg@aryeh.name>
Date: Mon, 16 Apr 2012 14:09:19 +0300
Message-ID: <CAKA+AxmsXgObPLje4veUpsxrqN7Y2rYq2ja_HPiy536qhkgEJg@mail.gmail.com>
To: CSS-testsuite <public-css-testsuite@w3.org>
Dirk Schulze submitted a bunch of feedback on my CSS Transforms test
submissions, mostly stylistic:
<http://test.csswg.org/shepherd/testcase/abspos-1b#event-4>.  I'd like
to make sure that it's agreed upon and written down somewhere.  So
here are some issues:

1) Tests in HTML format are accepted, but there's no template for
them.  The test format page <http://wiki.csswg.org/test/format> says
XHTML is preferred.  I suggest that it be changed to say that either
XHTML or HTML5 is preferred, and the following template be added:

<!DOCTYPE html>
  <title>CSS Test: DESCRIPTION OF TEST</title>
  <link rel="author" title="NAME_OF_AUTHOR" href="mailto:EMAIL OR
  <link rel="help" href="RELEVANT_SPEC_SECTION"/>
  <meta name="flags" content="TOKENS" />
  <meta name="assert" content="TEST ASSERTION"/>

Note that I removed the CDATA, and the type="text/css" (which is
unnecessary in HTML5).  I personally don't think <html>/<head>/<body>
should be used unless necessary, but it seems most people disagree
with me.  Given that, I'm okay with this template.

2) Additionally, the guidelines should say that quotes on attribute
values shouldn't be omitted for HTML5.  Again, I prefer omitting
quotes for brevity, but it seems most people disagree.

3) It should be more specific about indentation.  The template uses
one space for indentation; the tests I submitted use two spaces
(Mozilla's convention); Dirk prefers four.  Do we have a preference?

4) Dirk said that multiline <title>s cause problems for Shepherd.  If
this is so, should we make sure tests are formatted with one-line
<title>s or fix Shepherd?  (I usually break lines at 79 chars, which
is why I wrapped some of my <title>s to start with.)

5) The template's <title> starts with "CSS Test: ".  I'm guessing this
was written when all the tests were for CSS 2.1.  I wrote my transform
tests starting with "CSS Test (Transforms): " -- should we adopt a
convention like this for non-CSS 2.1 tests?  Maybe it should be "CSS
Test: Transforms - " or something else?  It looks like Shepherd
currently eats everything up to the first colon, so the "(Transforms)"
part is vanishing on Shepherd.
Received on Monday, 16 April 2012 11:10:21 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:24 UTC