annotate DataTables-1.9.4/scripts/unit_tests.sh @ 6:42076db43d42 draft

Fixed auto resizing plus various other minor bugs
author saskia-hiltemann
date Mon, 16 Nov 2015 08:56:22 -0500
parents ac5f9272033b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
1 #!/bin/sh
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
2
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
3 ENABLE=$1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
4
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
5 echo ""
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
6 echo " DataTables unit tests"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
7 echo ""
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
8
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
9 if [ ! "$ENABLE" = "Enable" -a ! "$ENABLE" = "Disable" -o "ENABLE" = "-h" ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
10 echo " Enable or Disable must be given as the first argument."
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
11 echo " Optionally the second argument can be given as an integer to enable/disable a certain "
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
12 echo " set of tests or the string 'sanity' to run the sanity check for all data types."
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
13 echo ""
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
14 exit 1
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
15 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
16
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
17 cd ../media/unit_testing
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
18
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
19 if [ "$ENABLE" = "Enable" ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
20 if [ ! -d tests ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
21 echo " Building test directory"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
22 mkdir tests
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
23 mkdir tests/1_dom
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
24 mkdir tests/2_js
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
25 mkdir tests/3_ajax
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
26 mkdir tests/4_server-side
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
27 mkdir tests/5_ajax_objects
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
28 mkdir tests/6_delayed_rendering
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
29 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
30
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
31 echo " Enabling:"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
32 if [ ! -z $2 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
33 if [ "$2" = "sanity" ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
34 echo " Sanity checks"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
35 mv tests_onhold/1_dom/_zero_config.js tests/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
36 mv tests_onhold/2_js/_zero_config.js tests/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
37 mv tests_onhold/3_ajax/_zero_config.js tests/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
38 mv tests_onhold/4_server-side/_zero_config.js tests/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
39 mv tests_onhold/5_ajax_objects/_zero_config.js tests/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
40 mv tests_onhold/6_delayed_rendering/_zero_config.js tests/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
41 elif [ $2 -eq 1 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
42 echo " DOM"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
43 mv tests_onhold/1_dom/* tests/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
44 elif [ $2 -eq 2 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
45 echo " JS"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
46 mv tests_onhold/2_js/* tests/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
47 elif [ $2 -eq 3 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
48 echo " Ajax"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
49 mv tests_onhold/3_ajax/* tests/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
50 elif [ $2 -eq 4 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
51 echo " SErver-side"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
52 mv tests_onhold/4_server-side/* tests/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
53 elif [ $2 -eq 5 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
54 echo " Ajax objects"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
55 mv tests_onhold/5_ajax_objects/* tests/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
56 elif [ $2 -eq 6 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
57 echo " Delayed rendering"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
58 mv tests_onhold/6_delayed_rendering/* tests/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
59 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
60 else
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
61 echo " All tests"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
62 mv tests_onhold/1_dom/* tests/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
63 mv tests_onhold/2_js/* tests/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
64 mv tests_onhold/3_ajax/* tests/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
65 mv tests_onhold/4_server-side/* tests/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
66 mv tests_onhold/5_ajax_objects/* tests/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
67 mv tests_onhold/6_delayed_rendering/* tests/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
68 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
69
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
70 else
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
71 echo " Disabling:"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
72 if [ ! -z $2 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
73 if [ "$2" = "sanity" ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
74 echo " Sanity checks"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
75 mv tests/1_dom/* tests_onhold/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
76 mv tests/2_js/* tests_onhold/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
77 mv tests/3_ajax/* tests_onhold/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
78 mv tests/4_server-side/* tests_onhold/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
79 mv tests/5_ajax_objects/* tests_onhold/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
80 mv tests/6_delayed_rendering/* tests_onhold/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
81 elif [ $2 -eq 1 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
82 echo " DOM"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
83 mv tests/1_dom/* tests_onhold/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
84 elif [ $2 -eq 2 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
85 echo " JS"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
86 mv tests/2_js/* tests_onhold/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
87 elif [ $2 -eq 3 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
88 echo " Ajax"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
89 mv tests/3_ajax/* tests_onhold/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
90 elif [ $2 -eq 4 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
91 echo " Server-side"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
92 mv tests/4_server-side/* tests_onhold/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
93 elif [ $2 -eq 5 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
94 echo " Ajax objects"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
95 mv tests/5_ajax_objects/* tests_onhold/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
96 elif [ $2 -eq 6 ]; then
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
97 echo " Delayed rendering"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
98 mv tests/6_delayed_rendering/* tests_onhold/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
99 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
100 else
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
101 echo " All tests"
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
102 mv tests/1_dom/* tests_onhold/1_dom/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
103 mv tests/2_js/* tests_onhold/2_js/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
104 mv tests/3_ajax/* tests_onhold/3_ajax/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
105 mv tests/4_server-side/* tests_onhold/4_server-side/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
106 mv tests/5_ajax_objects/* tests_onhold/5_ajax_objects/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
107 mv tests/6_delayed_rendering/* tests_onhold/6_delayed_rendering/
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
108 fi
ac5f9272033b first upload
saskia-hiltemann
parents:
diff changeset
109 fi