From f54afc9aec9dc72fb8db17376d162a6d1612c097 Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Wed, 5 Aug 2020 17:08:13 +0800 Subject: [PATCH] test scripts to check i118 --- test/ztf/conf/zdata.conf | 2 +- test/ztf/script/command/cmd_example.exp | 4 +-- test/ztf/script/command/cmd_example.php | 9 ------- test/ztf/script/command/cmd_i118.exp | 4 +++ test/ztf/script/command/cmd_i118.php | 36 +++++++++++++++++++++++++ test/ztf/script/command/cmd_usage.exp | 5 +--- test/ztf/script/command/cmd_usage.php | 12 --------- 7 files changed, 43 insertions(+), 29 deletions(-) create mode 100644 test/ztf/script/command/cmd_i118.exp create mode 100755 test/ztf/script/command/cmd_i118.php diff --git a/test/ztf/conf/zdata.conf b/test/ztf/conf/zdata.conf index 9931f35c..43cfb3ae 100644 --- a/test/ztf/conf/zdata.conf +++ b/test/ztf/conf/zdata.conf @@ -1,2 +1,2 @@ Version = 1 -Language = zh \ No newline at end of file +Language = en \ No newline at end of file diff --git a/test/ztf/script/command/cmd_example.exp b/test/ztf/script/command/cmd_example.exp index 7b5f9e6d..bf103b1d 100644 --- a/test/ztf/script/command/cmd_example.exp +++ b/test/ztf/script/command/cmd_example.exp @@ -1,4 +1,2 @@ >> zendata config ->> zendata config ->> zendata数据 ->> zendata数据 \ No newline at end of file +>> zendata config \ No newline at end of file diff --git a/test/ztf/script/command/cmd_example.php b/test/ztf/script/command/cmd_example.php index eaa779a2..0a8519f6 100755 --- a/test/ztf/script/command/cmd_example.php +++ b/test/ztf/script/command/cmd_example.php @@ -9,8 +9,6 @@ pid=0 [group] >> >> - >> - >> [esac] */ @@ -21,13 +19,6 @@ $zd = new zendata(); $zd->changeLang("en"); -$output = $zd->cmd("-e"); -print(">> $output[0]\n"); -$output = $zd->cmd("-example"); -print(">> $output[0]\n"); - -$zd->changeLang("zh"); - $output = $zd->cmd("-e"); print(">> $output[0]\n"); $output = $zd->cmd("-example"); diff --git a/test/ztf/script/command/cmd_i118.exp b/test/ztf/script/command/cmd_i118.exp new file mode 100644 index 00000000..6be113cc --- /dev/null +++ b/test/ztf/script/command/cmd_i118.exp @@ -0,0 +1,4 @@ +>> `ZenData is %s` +>> zendata config +>> ZenData是一款 +>> zendata数据 \ No newline at end of file diff --git a/test/ztf/script/command/cmd_i118.php b/test/ztf/script/command/cmd_i118.php new file mode 100755 index 00000000..b8cb9d1f --- /dev/null +++ b/test/ztf/script/command/cmd_i118.php @@ -0,0 +1,36 @@ +#!/usr/bin/env php +> + >> + >> + >> + +[esac] +*/ + +include_once __DIR__ . DIRECTORY_SEPARATOR . '../common/zd.php'; + +$zd = new zendata(); + +$zd->changeLang("en"); + +$output = $zd->cmd("-help"); +print(">> $output[0]\n"); +$output = $zd->cmd("-example"); +print(">> $output[0]\n"); + +$zd->changeLang("zh"); + +$output = $zd->cmd("-help"); +print(">> $output[0]\n"); +$output = $zd->cmd("-example"); +print(">> $output[0]\n"); + +$zd->changeLang("en"); \ No newline at end of file diff --git a/test/ztf/script/command/cmd_usage.exp b/test/ztf/script/command/cmd_usage.exp index 7958c438..d087e8f6 100644 --- a/test/ztf/script/command/cmd_usage.exp +++ b/test/ztf/script/command/cmd_usage.exp @@ -1,6 +1,3 @@ >> `ZenData is %s` >> `ZenData is %s` ->> `ZenData is %s` ->> ZenData是一款 ->> ZenData是一款 ->> ZenData是一款 \ No newline at end of file +>> `ZenData is %s` \ No newline at end of file diff --git a/test/ztf/script/command/cmd_usage.php b/test/ztf/script/command/cmd_usage.php index b0b37b92..397f49e8 100755 --- a/test/ztf/script/command/cmd_usage.php +++ b/test/ztf/script/command/cmd_usage.php @@ -10,9 +10,6 @@ pid=0 >> >> >> - >> - >> - >> [esac] */ @@ -23,15 +20,6 @@ $zd = new zendata(); $zd->changeLang("en"); -$output = $zd->cmd(""); -print(">> $output[0]\n"); -$output = $zd->cmd("-h"); -print(">> $output[0]\n"); -$output = $zd->cmd("-help"); -print(">> $output[0]\n"); - -$zd->changeLang("zh"); - $output = $zd->cmd(""); print(">> $output[0]\n"); $output = $zd->cmd("-h"); -- GitLab