Skip to content

Rewrite your app in Rust, piece by piece, checked against the original at every step. Works with TypeScript, JavaScript, Python, Go, Ruby, Java, C, PHP, C#, Kotlin, PowerShell and Swift.

291 B
Raw Blame
from slug import count_words, slugify


def test_slugify():
    assert slugify("Hello, World!") == "hello-world"
    assert slugify("Crème brûlée  recipe") == "creme-brulee-recipe"
    assert slugify("a" * 50, 5) == "aaaaa"


def test_count_words():
    assert count_words("a b  c") == 3