Skip to content

Instantly share code, notes, and snippets.

Created January 9, 2013 18:55
Show Gist options
  • Save anonymous/4495784 to your computer and use it in GitHub Desktop.
Save anonymous/4495784 to your computer and use it in GitHub Desktop.
see if you can make this pass
def parse_layout(s)
[]
end
describe 'Window layout parsing' do
it "handles nesting" do
layout = <<EOF
+---+---+
| A | B |
+---| |
| F | |
+---+---|
| C |
+-------+
| D | E |
+---+---+
EOF
parse_layout(layout).should ==
[:rows,
[:cols, [:rows, "A", "F"], "B"],
[:cols, "C"]
[:cols, "D", "E"]
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment