Skip to content

Commit

Permalink
Enable netrc tests
Browse files Browse the repository at this point in the history
Test for spaces in usernames and passwords is disabled for now as it's
not supported by current implementation.
  • Loading branch information
fredrik-eriksson authored and mgallien committed Jan 3, 2025
1 parent 89d08a0 commit ac7a2a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/testnetrcparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ private slots:

void testValidNetrc() {
NetrcParser parser(testfileC);
QEXPECT_FAIL("", "test currently broken, eventually will be fixed", Abort);
QVERIFY(parser.parse());
QCOMPARE(parser.find("foo"), qMakePair(QString("bar"), QString("baz")));
QCOMPARE(parser.find("broken"), qMakePair(QString("bar2"), QString()));
QCOMPARE(parser.find("funnysplit"), qMakePair(QString("bar3"), QString("baz3")));
QCOMPARE(parser.find("frob"), qMakePair(QString("user with spaces"), QString("space pwd")));
// Current implementation does not support spaces in username or password
//QCOMPARE(parser.find("frob"), qMakePair(QString("user with spaces"), QString("space pwd")));
}

void testEmptyNetrc() {
Expand All @@ -69,7 +69,6 @@ private slots:

void testValidNetrcWithDefault() {
NetrcParser parser(testfileWithDefaultC);
QEXPECT_FAIL("", "test currently broken, eventually will be fixed", Abort);
QVERIFY(parser.parse());
QCOMPARE(parser.find("foo"), qMakePair(QString("bar"), QString("baz")));
QCOMPARE(parser.find("dontknow"), qMakePair(QString("user"), QString("pass")));
Expand Down

0 comments on commit ac7a2a3

Please sign in to comment.