tags:

views:

608

answers:

2

I want to be able to put preformatted text (i.e. containing line breaks) into a single cell of a FitNesse fixture table. Is there a way to manipulate the FitNesse wiki markup to do this?

+1  A: 

One way to do this is to define a variable with the multi-line text and then refer to this from the table cell:

!define sql {  SELECT *
  FROM bar
  WHERE gaz = 14
}

|sql|
|${sql}|
Matthew Murdoch
This will not make the text preformatted
Johannes Brodwall
Hmmm... It seems to work. However I prefer your approach - I'll give it a try. Thanks.
Matthew Murdoch
+2  A: 

Use !- -! to get multiline table cells and {{{ }}} to get preformatted text. The {{{ has to be outside the !-

For example:

|sql|
|{{{!- SELECT *
     FROM bar
     WHERE gaz = 14
-!}}}|
Johannes Brodwall
Great - and more elegant than my workaround! Thanks.
Matthew Murdoch