Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I put preformatted text into a FitNesse fixture table cell?

Tags:

fitnesse

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?

like image 630
Matthew Murdoch Avatar asked Oct 25 '08 10:10

Matthew Murdoch


2 Answers

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
-!}}}|
like image 51
Johannes Brodwall Avatar answered Oct 07 '22 16:10

Johannes Brodwall


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}|
like image 30
Matthew Murdoch Avatar answered Oct 07 '22 16:10

Matthew Murdoch