Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/libbash:master commit in: src/core/tests/
Date: Fri, 27 May 2011 23:04:29
Message-Id: ba0032a7f8fadc05103acfc823f660e03913c9d6.betelgeuse@gentoo
1 commit: ba0032a7f8fadc05103acfc823f660e03913c9d6
2 Author: Mu Qiao <qiaomuf <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 25 14:59:12 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Thu May 26 14:56:16 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/libbash.git;a=commit;h=ba0032a7
7
8 Test: improve test coverage for bash_condition.cpp
9
10 ---
11 src/core/tests/bash_condition_test.cpp | 5 +++++
12 1 files changed, 5 insertions(+), 0 deletions(-)
13
14 diff --git a/src/core/tests/bash_condition_test.cpp b/src/core/tests/bash_condition_test.cpp
15 index 57ab4e9..de56fee 100644
16 --- a/src/core/tests/bash_condition_test.cpp
17 +++ b/src/core/tests/bash_condition_test.cpp
18 @@ -151,6 +151,9 @@ TEST_F(file_test, binary_operator)
19
20 EXPECT_TRUE(internal::test_binary("ef", positive, positive));
21 EXPECT_FALSE(internal::test_binary("ef", positive, negative));
22 + EXPECT_FALSE(internal::test_binary("ef", "not exist", negative));
23 +
24 + EXPECT_THROW(internal::test_binary("efd", positive, negative), interpreter_exception);
25 }
26
27 TEST(bash_condition, arithmetic_operator)
28 @@ -176,4 +179,6 @@ TEST(bash_condition, arithmetic_operator)
29 EXPECT_TRUE(internal::test_binary("ge", "1", "1"));
30 EXPECT_TRUE(internal::test_binary("ge", "2", "1"));
31 EXPECT_FALSE(internal::test_binary("ge", "0", "1"));
32 +
33 + EXPECT_FALSE(internal::test_binary("ge", "blah", "1"));
34 }