cleanup imports
Some checks failed
Test Rust project / test (ubuntu-latest, stable) (push) Failing after 41s
Some checks failed
Test Rust project / test (ubuntu-latest, stable) (push) Failing after 41s
This commit is contained in:
@@ -18,7 +18,7 @@ use ratatui::{
|
||||
use crate::app::{
|
||||
clipboard::Clipboard,
|
||||
error_msg::StatusMessage,
|
||||
logic::{self, calc::{Grid, get_header_size}, cell::CellType},
|
||||
logic::{calc::{Grid, get_header_size}, cell::CellType},
|
||||
mode::Mode,
|
||||
screen::ScreenSpace,
|
||||
};
|
||||
|
||||
@@ -851,6 +851,19 @@ fn parse_csv() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn invalid_ranges() {
|
||||
let mut grid = Grid::new();
|
||||
|
||||
grid.set_cell("A0", 2.);
|
||||
grid.set_cell("A1", 1.);
|
||||
// ASCII to number conversion needs to not overflow
|
||||
grid.set_cell("B0", "=sum($:A)".to_string());
|
||||
|
||||
let cell = grid.get_cell("B0").as_ref().expect("Just set it");
|
||||
let _ = grid.evaluate(&cell.to_string()).expect("Should evaluate.");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ranges() {
|
||||
let mut grid = Grid::new();
|
||||
|
||||
@@ -15,7 +15,7 @@ use crate::app::{
|
||||
app::App,
|
||||
error_msg::StatusMessage,
|
||||
logic::{
|
||||
calc::{CSV_EXT, CUSTOM_EXT, Grid, LEN},
|
||||
calc::{Grid, LEN},
|
||||
cell::CellType,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{collections::HashMap, sync::RwLock};
|
||||
|
||||
use ratatui::prelude;
|
||||
|
||||
use crate::app::logic::calc::{self, LEN};
|
||||
use crate::app::logic::calc::LEN;
|
||||
|
||||
pub struct ScreenSpace {
|
||||
/// This is measured in cells.
|
||||
|
||||
Reference in New Issue
Block a user