package placement

import "testing"

func TestCrawlerKeywordFromQuery(t *testing.T) {
	got := CrawlerKeywordFromQuery(`site:threads.net "敏感肌" 請問 after:2026-01-01`, "")
	if got != "敏感肌" {
		t.Fatalf("keyword = %q, want 敏感肌", got)
	}
	got = CrawlerKeywordFromQuery("", "換季泛紅")
	if got != "換季泛紅" {
		t.Fatalf("keyword = %q, want 換季泛紅", got)
	}
}
