summaryrefslogtreecommitdiff
path: root/libs/js/jquery-mobile-1.1.0/tests/unit/ls.php
blob: 577bfecc0f37358e422a2a15afb826f5da6d6db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
  header("Content-Type: application/json");

  $directories = array();

  if ($handle = opendir(getcwd())) {
    while (false !== ($file = readdir($handle))) {
      if (is_dir($file) && $file[0] !== "." ) {
        array_push($directories, $file);
      }
    }

    closedir($handle);
  }

  $test_pages = array_merge($directories, glob("**/*-tests.html"));
  sort($test_pages);

  echo '{ "testPages":["' . implode( '","', $test_pages ) . '"]}';
?>