Module: wine
Branch: master
Commit: 67873bdc9f2dc8ee905dd5f748e266e7137da06d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=67873bdc9f2dc8ee905dd5f74…
Author: Dan Kegel <dank(a)kegel.com>
Date: Wed May 25 21:42:37 2011 -0700
cmd: Add simple test for %errorlevel%.
---
programs/cmd/tests/test_builtins.cmd | 26 ++++++++++++++++++++++++++
programs/cmd/tests/test_builtins.cmd.exp | 8 ++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index 62dbc6c..2763d7c 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -94,6 +94,24 @@ del /a:r *.test
if not exist r.test echo r.test not found after delete, good
if exist r.test echo r.test found after delete, bad
+echo -----------Testing Errorlevel-----------
+rem nt 4.0 doesn't really support a way of setting errorlevel, so this is weak
+rem See http://www.robvanderwoude.com/exit.php
+call :setError 1
+echo %ErrorLevel%
+if errorlevel 2 echo errorlevel too high, bad
+if errorlevel 1 echo errorlevel just right, good
+call :setError 0
+echo abc%ErrorLevel%def
+if errorlevel 1 echo errorlevel nonzero, bad
+if not errorlevel 1 echo errorlevel zero, good
+rem Now verify that setting a real variable hides its magic variable
+set errorlevel=7
+echo %ErrorLevel% should be 7
+if errorlevel 7 echo setting var worked too well, bad
+call :setError 3
+echo %ErrorLevel% should still be 7
+
echo -----------Testing GOTO-----------
if a==a goto dest1
:dest1
@@ -107,3 +125,11 @@ echo goto with a leading tab worked
if d==d goto dest4
:dest4@space@
echo goto with a following space worked
+
+echo -----------Done, jumping to EOF-----------
+goto :eof
+rem Subroutine to set errorlevel and return
+rem in windows nt 4.0, this always sets errorlevel 1, since /b isn't supported
+:setError
+exit /B %1
+rem This line runs under cmd in windows NT 4, but not in more modern versions.
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 0dcd926..c185eb0 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -82,8 +82,16 @@ if /I seems to work
not-r.test not found after delete, good
r.test found before delete, good
r.test not found after delete, good
+-----------Testing Errorlevel-----------
+1
+errorlevel just right, good
+abc0def@or_broken@abc1def
+errorlevel zero, good@or_broken@errorlevel nonzero, bad
+7 should be 7
+7 should still be 7
-----------Testing GOTO-----------
goto with no leading space worked
goto with a leading space worked
goto with a leading tab worked
goto with a following space worked
+-----------Done, jumping to EOF-----------
Module: wine
Branch: master
Commit: 884ccf9b3c691870e2adc6b4f92587d29180c8b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=884ccf9b3c691870e2adc6b4f…
Author: Akihiro Sagawa <sagawa.aki(a)gmail.com>
Date: Wed May 25 20:49:39 2011 +0900
winedbg: Add Japanese resource.
---
programs/winedbg/Makefile.in | 1 +
programs/winedbg/rsrc_Ja.rc | 44 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
diff --git a/programs/winedbg/Makefile.in b/programs/winedbg/Makefile.in
index 34d7c35..8170eb8 100644
--- a/programs/winedbg/Makefile.in
+++ b/programs/winedbg/Makefile.in
@@ -37,6 +37,7 @@ RC_SRCS = \
rsrc_Fr.rc \
rsrc_He.rc \
rsrc_It.rc \
+ rsrc_Ja.rc \
rsrc_Ko.rc \
rsrc_Lt.rc \
rsrc_Nl.rc \
diff --git a/programs/winedbg/rsrc_Ja.rc b/programs/winedbg/rsrc_Ja.rc
new file mode 100644
index 0000000..80b5454
--- /dev/null
+++ b/programs/winedbg/rsrc_Ja.rc
@@ -0,0 +1,44 @@
+/*
+ * Japanese Language Support
+ *
+ * Copyright 2008 Mikolaj Zalewski
+ * Copyright 2011 Akihiro Sagawa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "resource.h"
+
+#pragma code_page(65001)
+
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+
+IDD_CRASH_DLG DIALOGEX 100, 100, 273, 175
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "プログラム エラー"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ LTEXT "",IDC_STATIC_BG,0,0,273,52,WS_BORDER,0
+ LTEXT "プログラム %s で重大な問題が発生したため、終了する必要があります。 \
+ ご不便をおかけし申し訳ありません。",
+ IDC_STATIC_TXT1,27,10,224,30
+ LTEXT "これはプログラム内の問題や Wine の欠陥によって発生することがあります。 \
+ http://appdb.winehq.org で このアプリケーションを動作させるヒントを \
+ 確認するとよいでしょう。\n\n\
+ この問題が Windows 上で発生することがなく、まだ報告されていない場合は \
+ http://bugs.winehq.org でこの問題を報告できます。",
+ IDC_STATIC_TXT2,27,60,224,100
+ DEFPUSHBUTTON "閉じる", IDOK, 205, 151, 60, 16, WS_TABSTOP
+END