From a9066ec3f3fb87d40a7891959f33567deda7c307 Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle Date: Tue, 16 May 2017 19:03:37 +0200 Subject: [PATCH] fixed test script --- example-script/info.json | 2 +- run-tests.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example-script/info.json b/example-script/info.json index ca48873..dd3549e 100644 --- a/example-script/info.json +++ b/example-script/info.json @@ -1,6 +1,6 @@ { "name": "Example script", - "identifier": "example-scriptX", + "identifier": "example-script", "script": "example-script.qml", "version": "0.0.1", "description" : "Use this script to start a new script you want to submit to the script repository.\\n\\nJust copy the whole 'example-script' folder and rename it and also the 'example-script.qml'" diff --git a/run-tests.php b/run-tests.php index b8bf474..102edce 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1,4 +1,4 @@ -#!/bin/env php +#!/usr/bin/env php 0) { exit(1); } -print "No errors were found"; - +print "No errors were found\n"; +exit(0); class TestHelper { public $errors = array(); @@ -42,7 +42,7 @@ class TestHelper { $identifier = $data["identifier"]; if ($identifier == "") { $errors[] = "No identifier was entered!"; - } elseif (preg_match('/[^a-z0-9]/', $str)) { + } elseif (preg_match('/[^a-z0-9\-_]/', $identifier)) { $errors[] = "Invalid charactes were found in identifier '$identifier'!"; }