# Path: terminaltables/other_tables.py
# class PorcelainTable(AsciiTable):
#     """An AsciiTable stripped to a minimum.
# 
#     Meant to be machine passable and roughly follow format set by git --porcelain option (hence the name).
# 
#     :ivar iter table_data: List (empty or list of lists of strings) representing the table.
#     """
# 
#     def __init__(self, table_data):
#         """Constructor.
# 
#         :param iter table_data: List (empty or list of lists of strings) representing the table.
#         """
#         # Porcelain table won't support title since it has no outer birders.
#         super(PorcelainTable, self).__init__(table_data)
# 
#         # Removes outer border, and inner footing and header row borders.
#         self.inner_footing_row_border = False
#         self.inner_heading_row_border = False
#         self.outer_border = False


from terminaltables import PorcelainTable
    table_data = [
        ['Name', 'Color', 'Type'],
        ['Avocado', 'green', 'nut'],
        ['Tomato', 'red', 'fruit'],
        ['Lettuce', 'green', 'vegetable'],
        ['Watermelon', 'green']
    ]
    table = PorcelainTable(table_data)
    table.justify_columns[0] = 'left'
    table.justify_columns[1] = 'center'
    table.justify_columns[2] = 'right'
    actual = table.table

    expected = (
        ' Name       | Color |      Type \n'
        ' Avocado    | green |       nut \n'
        ' Tomato     |  red  |     fruit \n'
        ' Lettuce    | green | vegetable \n'
        ' Watermelon | green |           '
    )
    assert actual == expected


def test_multi_line():
    """Test multi-lined cells."""
    table_data = [
        ['Show', 'Characters'],
        ['Rugrats', 'Tommy Pickles, Chuckie Finster, Phillip DeVille, Lillian DeVille, Angelica Pickles,\nDil Pickles'],
        ['South Park', 'Stan Marsh, Kyle Broflovski, Eric Cartman, Kenny McCormick']
    ]

# Path: terminaltables/other_tables.py
# class PorcelainTable(AsciiTable):
#     """An AsciiTable stripped to a minimum.
# 
#     Meant to be machine passable and roughly follow format set by git --porcelain option (hence the name).
# 
#     :ivar iter table_data: List (empty or list of lists of strings) representing the table.
#     """
# 
#     def __init__(self, table_data):
#         """Constructor.
# 
#         :param iter table_data: List (empty or list of lists of strings) representing the table.
#         """
#         # Porcelain table won't support title since it has no outer birders.
#         super(PorcelainTable, self).__init__(table_data)
# 
#         # Removes outer border, and inner footing and header row borders.
#         self.inner_footing_row_border = False
#         self.inner_heading_row_border = False
#         self.outer_border = False


# Path: tests/test_all_tables_e2e/test_porcelain_table.py
from terminaltables import PorcelainTable

    table_data = [
        ['Name', 'Color', 'Type'],
        ['Avocado', 'green', 'nut'],
        ['Tomato', 'red', 'fruit'],
        ['Lettuce', 'green', 'vegetable'],
        ['Watermelon', 'green']
    ]
    table = PorcelainTable(table_data)
    table.justify_columns[0] = 'left'
    table.justify_columns[1] = 'center'
    table.justify_columns[2] = 'right'
    actual = table.table

    expected = (
        ' Name       | Color |      Type \n'
        ' Avocado    | green |       nut \n'
        ' Tomato     |  red  |     fruit \n'
        ' Lettuce    | green | vegetable \n'
        ' Watermelon | green |           '
    )
    assert actual == expected


def test_multi_line():
    """Test multi-lined cells."""
    table_data = [
        ['Show', 'Characters'],
        ['Rugrats', 'Tommy Pickles, Chuckie Finster, Phillip DeVille, Lillian DeVille, Angelica Pickles,\nDil Pickles'],
        ['South Park', 'Stan Marsh, Kyle Broflovski, Eric Cartman, Kenny McCormick']
    ]

    table = PorcelainTable(table_data)