"""Tests para get_text_stats."""
import sys
import os

sys.path.insert(0, os.path.dirname(__file__))
from core import get_text_stats


def test_texto_normal_con_palabras_y_lineas():
    result = get_text_stats("hello world\nfoo bar")
    assert result == {"total_chars": 19, "total_lines": 2, "total_words": 4}


def test_texto_vacio_retorna_ceros():
    result = get_text_stats("")
    assert result == {"total_chars": 0, "total_lines": 1, "total_words": 0}


def test_texto_con_solo_newlines():
    result = get_text_stats("\n\n")
    assert result == {"total_chars": 2, "total_lines": 3, "total_words": 0}
