Skip to content

Commit

Permalink
fmt_compile, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
PankajBhojwani committed Apr 17, 2024
1 parent 5ee630e commit 360b92e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cascadia/TerminalSettingsModel/ActionAndArgs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ namespace winrt::Microsoft::Terminal::Settings::Model::implementation
if (_Action != ShortcutAction::Invalid)
{
auto actionKeyString = ActionToStringMap.find(_Action)->second;
auto result = fmt::format(L"User.{}", std::wstring{ actionKeyString.begin(), actionKeyString.end() });
auto result = fmt::format(FMT_COMPILE(L"User.{}"), actionKeyString);
if (_Args)
{
// If there are args, we need to append the hash of the args
Expand Down
8 changes: 7 additions & 1 deletion src/cascadia/UnitTests_SettingsModel/SerializationTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ using namespace WEX::Common;
using namespace winrt::Microsoft::Terminal::Settings::Model;
using namespace winrt::Microsoft::Terminal::Control;

#if defined(_M_IX86)
#define sendInputID "56911147"
#else
#define sendInputID "A020D2"
#endif

namespace SettingsModelUnitTests
{
class SerializationTests : public JsonTestClass
Expand Down Expand Up @@ -974,7 +980,7 @@ namespace SettingsModelUnitTests
"name": "foo",
"command": { "action": "sendInput", "input": "just some input" },
"keys": "ctrl+shift+w",
"id" : "User.sendInput.A020D2"
"id" : "User.sendInput.)" sendInputID R"("
}
]
})" };
Expand Down

0 comments on commit 360b92e

Please sign in to comment.