Skip to content

Commit

Permalink
Fix command line test
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Jul 28, 2023
1 parent dbfb3dd commit a399070
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/gz_TEST.cc → test/integration/gz_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ TEST(CmdLine, MsgList)
{
auto output = custom_exec_str("gz msg --list --force-version " +
g_version);
EXPECT_NE(std::string::npos, output.find("gz.msgs.WorldControl"))
EXPECT_NE(std::string::npos, output.find("gz.msgs.Boolean"))
<< output;
}

/////////////////////////////////////////////////
TEST(CmdLine, MsgInfo)
{
auto output = custom_exec_str("gz msg --info gz_msgs.WorldControl "
"--force-version " + g_version);
EXPECT_NE(std::string::npos, output.find("message WorldControl {"))
auto output = custom_exec_str("gz msg --info gz_msgs.Boolean"
" --force-version " + g_version);
EXPECT_NE(std::string::npos, output.find("message Boolean {"))
<< output;
}

Expand All @@ -100,7 +100,7 @@ TEST(CmdLine, MsgHelpVsCompletionFlags)

// Call the output function in the bash completion script
std::filesystem::path scriptPath = PROJECT_SOURCE_PATH;
scriptPath = scriptPath / "compiled" / "src" / "cmd" / "msgs.bash_completion.sh";
scriptPath = scriptPath / "core" / "src" / "cmd" / "msgs.bash_completion.sh";

// Equivalent to:
// sh -c "bash -c \". /path/to/msgs.bash_completion.sh; _gz_msgs_flags\""
Expand Down

0 comments on commit a399070

Please sign in to comment.