processor_test.go 535 B

1234567891011121314151617
  1. // SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
  2. // SPDX-License-Identifier: Apache-2.0
  3. package processor // import "miniflux.app/v2/internal/reader/processor"
  4. import (
  5. "testing"
  6. )
  7. func TestMinifyEntryContent(t *testing.T) {
  8. input := `<p> Some text with a <a href="http://example.org/"> link </a> </p>`
  9. expected := `<p>Some text with a <a href="http://example.org/">link</a></p>`
  10. result := minifyContent(input)
  11. if expected != result {
  12. t.Errorf(`Unexpected result, got %q`, result)
  13. }
  14. }