rsvim_core 0.1.3-alpha.2

The core library for RSVIM text editor.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::file_encoding::*;
use std::str::FromStr;

#[test]
fn display1() {
  assert_eq!("utf-8", FileEncodingOption::Utf8.to_string());
  assert_eq!("utf-8", format!("{}", FileEncodingOption::Utf8));
}

#[test]
fn from_str1() {
  assert_eq!(
    FileEncodingOption::from_str("utf-8").unwrap(),
    FileEncodingOption::Utf8
  );
  assert!(FileEncodingOption::from_str("a").is_err());
}