chromium/net/dns/nsswitch_reader_unittest.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "net/dns/nsswitch_reader.h"

#include <string>
#include <utility>
#include <vector>

#include "base/check.h"
#include "base/functional/bind.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace net {
namespace {

class TestFileReader {};

class NsswitchReaderTest : public testing::Test {};

// Attempt to load the actual nsswitch.conf for the test machine and run
// rationality checks for the result.
TEST_F(NsswitchReaderTest, ActualReadAndParseHosts) {}

TEST_F(NsswitchReaderTest, FileReadErrorResultsInDefault) {}

TEST_F(NsswitchReaderTest, MissingHostsResultsInDefault) {}

TEST_F(NsswitchReaderTest, ParsesAllKnownServices) {}

TEST_F(NsswitchReaderTest, ParsesRepeatedServices) {}

TEST_F(NsswitchReaderTest, ParsesAllKnownActions) {}

TEST_F(NsswitchReaderTest, ParsesAllKnownStatuses) {}

TEST_F(NsswitchReaderTest, ParsesRepeatedActions) {}

TEST_F(NsswitchReaderTest, ParsesCombinedActionLists) {}

TEST_F(NsswitchReaderTest, HandlesAtypicalWhitespace) {}

TEST_F(NsswitchReaderTest, HandlesAtypicalWhitespaceInActions) {}

TEST_F(NsswitchReaderTest, ParsesActionsWithoutService) {}

TEST_F(NsswitchReaderTest, ParsesNegatedActions) {}

TEST_F(NsswitchReaderTest, ParsesUnrecognizedServiceAsUnknown) {}

TEST_F(NsswitchReaderTest, ParsesUnrecognizedStatusAsUnknown) {}

TEST_F(NsswitchReaderTest, ParsesUnrecognizedActionAsUnknown) {}

TEST_F(NsswitchReaderTest, ParsesInvalidActionsAsUnknown) {}

TEST_F(NsswitchReaderTest, IgnoresInvalidlyClosedActions) {}

TEST_F(NsswitchReaderTest, ParsesServicesAfterInvalidlyClosedActionsAsUnknown) {}

TEST_F(NsswitchReaderTest, IgnoresComments) {}

TEST_F(NsswitchReaderTest, IgnoresEndOfLineComments) {}

TEST_F(NsswitchReaderTest, IgnoresCapitalization) {}

TEST_F(NsswitchReaderTest, IgnoresEmptyActions) {}

TEST_F(NsswitchReaderTest, IgnoresRepeatedActionBrackets) {}

TEST_F(NsswitchReaderTest, IgnoresRepeatedActionBracketsWithWhitespace) {}

TEST_F(NsswitchReaderTest, RejectsNonSensicalActionBrackets) {}

TEST_F(NsswitchReaderTest, RejectsServicesWithBrackets) {}

// Other than the case of repeating opening brackets, nested brackets are not
// valid and should just get treated as part of an action label.
TEST_F(NsswitchReaderTest, RejectsNestedActionBrackets) {}

TEST_F(NsswitchReaderTest, IgnoresEmptyActionWithRepeatedBrackets) {}

TEST_F(NsswitchReaderTest, IgnoresEmptyActionAtEndOfString) {}

}  // namespace
}  // namespace net