2023-06-19 14:42:47 -07:00
|
|
|
// SPDX-FileCopyrightText: Copyright The Miniflux Authors. All rights reserved.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
2020-10-16 22:40:56 +01:00
|
|
|
|
2023-08-10 19:46:45 -07:00
|
|
|
package processor // import "miniflux.app/v2/internal/reader/processor"
|
2020-10-16 22:40:56 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2020-10-19 22:07:35 -07:00
|
|
|
)
|
2020-10-16 22:40:56 +01:00
|
|
|
|
2024-04-23 20:08:09 -07:00
|
|
|
func TestMinifyEntryContent(t *testing.T) {
|
|
|
|
input := `<p> Some text with a <a href="http://example.org/"> link </a> </p>`
|
|
|
|
expected := `<p>Some text with a <a href="http://example.org/">link</a></p>`
|
2025-06-18 22:27:18 +02:00
|
|
|
result := minifyContent(input)
|
2024-04-23 20:08:09 -07:00
|
|
|
if expected != result {
|
|
|
|
t.Errorf(`Unexpected result, got %q`, result)
|
|
|
|
}
|
|
|
|
}
|