Skip to content

Commit

Permalink
Added ::= tests/reading.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmatthes authored Jan 10, 2024
1 parent 03d5239 commit 76df02b
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/reading.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*********************** GNU General Public License 3.0 ***********************\
| |
| Copyright (C) 2024 Kevin Matthes |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU General Public License as published by |
| the Free Software Foundation, either version 3 of the License, or |
| (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
| |
| You should have received a copy of the GNU General Public License |
| along with this program. If not, see <https://www.gnu.org/licenses/>. |
| |
\******************************************************************************/

use aeruginous_io::ReadPathBufLike;

#[test]
fn read_path_buf_like_failure_directory() {
assert!(".github/".read().is_err());
}

#[test]
fn read_path_buf_like_failure_does_not_exist() {
assert!("no_such_file.txt".read().is_err());
}

#[test]
fn read_path_buf_like_success() {
assert_eq!(
"tests/assets/GPL-3.0.rs".read().unwrap(),
"\
/// Copyright (C) 2023 Kevin Matthes
///
/// This program is free software: you can redistribute it and/or modify
/// it under the terms of the GNU General Public License as published by
/// the Free Software Foundation, either version 3 of the License, or
/// (at your option) any later version.
///
/// This program is distributed in the hope that it will be useful,
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/// GNU General Public License for more details.
///
/// You should have received a copy of the GNU General Public License
/// along with this program. If not, see <https://www.gnu.org/licenses/>.
"
);
}

/******************************************************************************/

0 comments on commit 76df02b

Please sign in to comment.