Skip to content

Commit

Permalink
Amend merge failure (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicant committed Nov 5, 2023
1 parent fa5243e commit bd66f74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions yash-builtin/src/typeset/print_variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl std::fmt::Display for AttributeOption<'_> {
mod tests {
use super::*;
use yash_env::option::{Off, On};
use yash_env::variable::ContextType;
use yash_env::variable::Context;

#[test]
fn printing_one_variable() {
Expand Down Expand Up @@ -215,7 +215,7 @@ mod tests {
.get_or_new("global", Scope::Global.into())
.assign("global value", None)
.unwrap();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
inner
.get_or_new("local", Scope::Local.into())
.assign("local value", None)
Expand All @@ -241,7 +241,7 @@ mod tests {
.get_or_new("global", Scope::Global.into())
.assign("global value", None)
.unwrap();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
inner
.get_or_new("local", Scope::Local.into())
.assign("local value", None)
Expand All @@ -263,7 +263,7 @@ mod tests {
.get_or_new("one", Scope::Global.into())
.assign("1", None)
.unwrap();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
inner
.get_or_new("two", Scope::Local.into())
.assign("2", None)
Expand Down Expand Up @@ -294,7 +294,7 @@ mod tests {
.get_or_new("one", Scope::Global.into())
.assign("1", None)
.unwrap();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
inner
.get_or_new("two", Scope::Local.into())
.assign("2", None)
Expand Down
8 changes: 4 additions & 4 deletions yash-builtin/src/typeset/set_variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ mod tests {
use super::*;
use assert_matches::assert_matches;
use yash_env::option::Option::AllExport;
use yash_env::variable::{ContextType, Variable};
use yash_env::variable::{Context, Variable};
use yash_syntax::source::Location;

#[test]
fn setting_local_variables() {
let mut outer = Env::new_virtual();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
let baz_location = Location::dummy("baz assigned");
let mut baz = inner.get_or_create_variable("baz", Scope::Local.into());
baz.assign("BAZ", baz_location.clone()).unwrap();
Expand Down Expand Up @@ -134,7 +134,7 @@ mod tests {
let baz_location = Location::dummy("assign");
let mut baz = outer.get_or_create_variable("baz", Scope::Global.into());
baz.assign("BAZ", baz_location.clone()).unwrap();
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
let sv = SetVariables {
variables: Field::dummies(["foo=FOO", "bar", "baz"]),
attrs: vec![],
Expand Down Expand Up @@ -326,7 +326,7 @@ mod tests {
let mut var = outer.get_or_create_variable("var", Scope::Global.into());
var.assign("VAR", assign_location.clone()).unwrap();
var.make_read_only(assign_location.clone());
let mut inner = outer.push_context(ContextType::Regular);
let mut inner = outer.push_context(Context::default());
let sv = SetVariables {
variables: Field::dummies(["var=NEW"]),
attrs: vec![(VariableAttr::ReadOnly, State::Off)],
Expand Down

0 comments on commit bd66f74

Please sign in to comment.