Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Add acceptance tests that elaborate expected behaviour

Abierto
#129 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
rust
Área
cli, testing-qa

Línea de trabajo

Revisa el manejo existente de funcionalidades y flags de la utilidad junto con Cargo.toml y, después, reproduce el caso de nueva línea de -F en Linux usando hostname::set(). Define pruebas de aceptación para los flags y las funcionalidades pendientes descritos, incluido el comportamiento esperado y si las discrepancias corresponden a la utilidad o a la dependencia hostname.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

While it is nice to have a reference point against which to check the utility's behaviour, it will still be immensely helpful to integrate certain acceptance tests for all features/flags (even the ones that are "todo"). Besides it will also determine scoping vis-a-vis say, the crate, hostname (0.4) that is currently a dependency.

Here's a case in point as far as librarr crate vs utility bin goes:

  • when attempting to introduce the "set" option, one way is to invoke the crate hostname(0.4)'s set call, i.e. hostname::set(), and also including the feature "set" in the Cargo.toml
  • for a file passed as input with -F, this basically means reading it in a buffer, calling trim() on it and then calling hostname::set() on it - at a very basic level
  • however, if one tests it on Linux boxes with a file input, for an input even with a newline say

test name 1
t e s t name

it (hostname::set() ) still sets the name as is i.e. with the new lines and a total of 3 lines of the hostname. This is very different from how the usual Linux/Mac hostname utility behaves - question is, who owns the discrepancy and its fixing - the utility or the crate?

  • now, it is unclear whether this will be called out as a bug in the utility or needs to be escalated as a bug in the dependency crate named hostname

Other cases might arise too; therefore, it will be great to articulate all the reqs as test cases

Lenguaje dominante
Rust
Estrellas
34
Forks
15
Merge medio
5 h 44 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de uutils/hostname

Todos los issues de uutils/hostname

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.