Added test to repository.

  Shamelessly stolen the idea from M<Test::Synopsis>.
  Updated examples to pass our new syntax check.

  The test-case `t/sample-code.t` highlighted some syntax-errors
 in our sample code.   Now we have fixed it.