\input regression-test.tex
\documentclass{article}
\usepackage{seatingchart}

\begin{document}
\START

\makeatletter
\RenewDocumentCommand{\sc@active@DrawSeating}{o}{\toggletrue{sc@drawn}}
\makeatother

\begin{luacode*}
  function sc_test_scheme(name)
    local values = {}
    for i = 1, AllSeats.size do
      local seat = AllSeats[i]
      values[i] = string.format("%d:%d:%d:%d", seat.kind, seat.rrow, seat.rcol, seat.col)
    end
    texio.write_nl("log", name .. "=" .. table.concat(values, ","))
  end
\end{luacode*}

\begin{seatingchart}[shape=rectangle,rows=3,seats per row=4]
  \scSeatingScheme{2x2-}
  \directlua{sc_test_scheme("PREDEFINED")}
\end{seatingchart}

\begin{seatingchart}[shape=rectangle,rows=2,seats per row=5]
  \scSetAisle{3}
  \scSeatingScheme*[row sep=1,aisle restarts scheme=true]{X-}
  \directlua{sc_test_scheme("EXPLICIT")}
\end{seatingchart}

\END
