# # # patch "tests/changelog_editor/__driver__.lua" # from [f891608f0776e2ff3e5e58296b53647fff41c5f2] # to [adbd24663af0e6862ee903a0a4d7d49db52e2235] # # patch "tests/commit_default_editor/__driver__.lua" # from [8d2c518dae48558b15227fd42c33831271f42fe6] # to [234a2c7d4cf59fcaa4bb1efb7b2417ba91bcdf35] # ============================================================ --- tests/changelog_editor/__driver__.lua f891608f0776e2ff3e5e58296b53647fff41c5f2 +++ tests/changelog_editor/__driver__.lua adbd24663af0e6862ee903a0a4d7d49db52e2235 @@ -5,22 +5,9 @@ check(get("changelog.lua")) check(get("changelog.lua")) --- status warns with bad date format - -check(mtn("status"), 0, false, false) -check(mtn("status", "--date-format", "%Y-%m-%d"), 0, false, true) -check(qgrep("date format", "stderr")) - - -- commits that fail --- commit fails with bad date format - -check(mtn("commit", "--date-format", "%Y-%m-%d"), 1, false, true) -check(qgrep("date format", "stderr")) -check(not exists("_MTN/commit")) - -- commit fails with empty message writefile("_MTN/log", "empty message") @@ -178,7 +165,19 @@ remove("_MTN/commit") -- commits that succeed +-- commit succeeds with bad date format (uses default format instead) +remove("_MTN/log") +check(mtn("commit", "--message=ok", "--date-format", "%Y-%m-%d"), 0, false, true) +if ostype == "Windows" then + -- date parsing never works on Win32, so + -- get_default_command_options specifies --no-format-dates, and + -- we don't get a warning message. +else + check(qgrep("using default date format", "stderr")) +end + + -- test unchanged --date, --author and --branch options writefile("a", "a2.1") @@ -190,7 +189,7 @@ check(not exists("_MTN/commit")) check(qgrep("Branch: left", "stdout")) check(not exists("_MTN/commit")) --- test changed --date, --author and --branch options +-- test changed --date, --author and --branch options writefile("a", "a2.2") writefile("_MTN/log", "change author/date/branch") ============================================================ --- tests/commit_default_editor/__driver__.lua 8d2c518dae48558b15227fd42c33831271f42fe6 +++ tests/commit_default_editor/__driver__.lua 234a2c7d4cf59fcaa4bb1efb7b2417ba91bcdf35 @@ -12,4 +12,8 @@ check(mtn("--branch", "testbranch", "com -- and provides a fake "editor" executable check(mtn("--branch", "testbranch", "commit", "--date-format", "foo"), 0, false, true) -check(qgrep("date format 'foo' cannot be used for commit; using default instead", "stderr")) + +if ostype ~= "Windows" then + -- date parsing never works on Win32, so warning is suppressed + check(qgrep("date format 'foo' cannot be parsed; using default instead", "stderr")) +end