Nushell internal commands. Anchor locations tracker surveying. (#2635)

This commit is contained in:
Andrés N. Robalino
2020-10-03 09:06:02 -05:00
committed by GitHub
parent 0adf2accdd
commit ae1d4bdb4c
180 changed files with 1169 additions and 465 deletions

View File

@ -188,12 +188,13 @@ pub fn average(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -44,10 +44,10 @@ mod tests {
use std::str::FromStr;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(Command {})
Ok(test_examples(Command {})?)
}
#[test]

View File

@ -100,12 +100,13 @@ pub fn parse<T: Into<Tag>>(math_expression: &str, tag: T) -> Result<Value, Strin
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -58,12 +58,13 @@ pub fn maximum(values: &[Value], _name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -186,12 +186,13 @@ fn compute_average(values: &[Value], name: impl Into<Tag>) -> Result<Value, Shel
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -58,12 +58,13 @@ pub fn minimum(values: &[Value], _name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -83,12 +83,13 @@ pub fn mode(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -115,12 +115,13 @@ pub fn product(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -141,12 +141,13 @@ pub fn compute_stddev(values: &[Value], n: usize, name: &Tag) -> Result<Value, S
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -125,12 +125,13 @@ pub fn summation(values: &[Value], name: &Tag) -> Result<Value, ShellError> {
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}

View File

@ -240,12 +240,13 @@ pub fn compute_variance(values: &[Value], n: usize, name: &Tag) -> Result<Value,
#[cfg(test)]
mod tests {
use super::ShellError;
use super::SubCommand;
#[test]
fn examples_work_as_expected() {
fn examples_work_as_expected() -> Result<(), ShellError> {
use crate::examples::test as test_examples;
test_examples(SubCommand {})
Ok(test_examples(SubCommand {})?)
}
}