diff --git a/module/git/test/model/convertlog.php b/module/git/test/model/convertlog.php index 8d0427a39d..aeb486aec2 100755 --- a/module/git/test/model/convertlog.php +++ b/module/git/test/model/convertlog.php @@ -1,21 +1,23 @@ #!/usr/bin/env php convertLog(); +timeout=0 cid=1 -pid=1 -使用正确格式的数据 >> e7699d04f1586d337f34496da932dde55db92616 +- 使用正确格式的数据属性revision @e7699d04f1586d337f34496da932dde55db92616 +- 使用空的数据属性revision @0 */ -$git = new gitTest(); +global $tester; +$git = $tester->loadModel('git'); +$log = array(); $log[] = "commit e7699d04f1586d337f34496da932dde55db92616"; $log[] = "Author: zhengrunyu "; $log[] = "Date: Thu May 5 16:19:48 2022 +0800"; @@ -23,5 +25,4 @@ $log[] = " * Fix bug 22061."; r($git->convertLog($log)) && p('revision') && e('e7699d04f1586d337f34496da932dde55db92616'); // 使用正确格式的数据 $log = array(); -r($git->convertLog($log)) && p('revision') && e(0); // 使用空的数据 - +r($git->convertLog($log)) && p('revision') && e(0); // 使用空的数据 \ No newline at end of file diff --git a/module/svn/test/model/convertlog.php b/module/svn/test/model/convertlog.php new file mode 100755 index 0000000000..abd5e106ae --- /dev/null +++ b/module/svn/test/model/convertlog.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php +convertLog(); +timeout=0 +cid=1 + +- 使用正确格式的数据属性revision @e7699d04f1586d337f34496da932dde55db92616 +- 使用空的数据属性revision @0 + +*/ + +global $tester; +$svn = $tester->loadModel('svn'); + +$log = array(); +$log[] = "commit e7699d04f1586d337f34496da932dde55db92616"; +$log[] = "Author: zhengrunyu "; +$log[] = "Date: Thu May 5 16:19:48 2022 +0800"; +$log[] = " * Fix bug 22061."; +r($svn->convertLog($log)) && p('revision') && e('e7699d04f1586d337f34496da932dde55db92616'); // 使用正确格式的数据 + +$log = array(); +r($svn->convertLog($log)) && p('revision') && e(0); // 使用空的数据