blob: dbab1e16a4fc276bc992a8a2c68dd13c467df719 [file] [log] [blame]
# Copyright 2024 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Generated by //build/rust/tests/create_rustdoc_tests.py
# Test explanation: We use the regular and transitive dependencies. Both should appear in the item docs for the final crate.
import unittest # noqa
from sys import argv
from unittest import TestCase
from zipfile import Path
_doc_zip = argv.pop()
class Test(TestCase):
_path: Path
@classmethod
def setUpClass(cls) -> None:
cls._path = Path(_doc_zip)
def testFileExists5(self) -> None:
self.assertFalse(
(self._path / "quebec/struct.Quebec.html").is_file(),
msg=f"expected `quebec/struct.Quebec.html` to not be a file in {repr(self._path)}",
)
def testFileExists6(self) -> None:
self.assertFalse(
(self._path / "tango/trait.Tango.html").is_file(),
msg=f"expected `tango/trait.Tango.html` to not be a file in {repr(self._path)}",
)
def testFileExists7(self) -> None:
self.assertTrue(
(self._path / "sierra/struct.Sierra.html").is_file(),
msg=f"expected `sierra/struct.Sierra.html` to be a file in {repr(self._path)}",
)
def testFileContainsRaw8(self) -> None:
found = (self._path / "sierra/struct.Sierra.html").read_text()
self.assertIn(
"Tango",
found,
)