Go client for the Write.as API https://developers.write.as
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
413 B

  1. package writeas
  2. import (
  3. "testing"
  4. )
  5. func TestMarkdown(t *testing.T) {
  6. dwac := NewDevClient()
  7. in := "This is *formatted* in __Markdown__."
  8. out := `<p>This is <em>formatted</em> in <strong>Markdown</strong>.</p>
  9. `
  10. res, err := dwac.Markdown(in, "")
  11. if err != nil {
  12. t.Errorf("Unexpected fetch results: %+v, err: %v\n", res, err)
  13. }
  14. if res != out {
  15. t.Errorf(`Got: '%s'
  16. Expected: '%s'`, res, out)
  17. }
  18. }