1. Shlomi Fish
  2. Quad-Pres


shl...@6a489e09-e8c2-0310-a3fb-a128a961c0b2  committed 4ab3d0b

1. Modified the body-dir test to actually do what it is supposed to do.

  • Participants
  • Parent commits aabef64
  • Branches default

Comments (0)

Files changed (4)

File installer/TODO

View file
  • Ignore whitespace
 * Document the charset and language tags.
-* Implement a header tag for all the themes.
+* Deal with the address:email tag of the alon theme
 Long Term:

File installer/tests/Makefile

View file
  • Ignore whitespace
 all: check
-BASH_TESTS = html-correctness stop-on-error lang-settings 
+BASH_TESTS = html-correctness stop-on-error lang-settings body-dir
 BASH_TESTS_TARGETS = $(addprefix test-,$(BASH_TESTS))

File installer/tests/body-dir/test1.bash

View file
  • Ignore whitespace
 local theme
-echo "Test No. $t : Theme=$theme"
+local dir
+echo "Test No. $t : Theme=$theme dir=$dir"
 quadp setup $test_dir --dest-dir=`pwd`/${test_dir}-output
 sed -i "s/-DTHEME=[-a-zA-Z_]\+/-DTHEME=${theme}/" $test_dir/.wmlrc
 cat > $test_dir/src/index.html.wml <<EOF
+<set-var body_dir="$dir" />
 #include 'template.wml'
     echo "File does not validate!" 1>&2 
+if test "$dir" == "rtl" ; then
+    body_str="<body dir=\"rtl\">"
+if ! grep -F "$body_str" $output_file > /dev/null ; then
+    echo "File does not contain the correct body!" 1>&2
+    exit
 for theme in $(cd ../../installation/share/quad-pres/wml/themes/ && ls) ; do
-    perform_test "$theme"
+    for dir in ltr rtl ; do        
+        perform_test "$theme" "$dir"
+    done

File installer/wml/quadpres_main.wml

View file
  • Ignore whitespace
 <default-var "lang" "en-US" />
 <default-var "charset" "iso-8859-1" />
-<default-var "main_dir" "ltr" />
+<default-var "body_dir" "ltr" />
 <define-tag qp:html:header>
 <?xml version="1.0" encoding="<get-var charset />"?>
 <define-tag qp:html:bodystart>
-<ifeq "<get-var "base_dir" />" "rtl" 
+<ifeq "<get-var "body_dir" />" "rtl" 
     "<body dir="rtl">"